1 /*******************************************************************************
2 * Copyright (c) 2009 Ordina and committers to Mod4j
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Ordina - initial implementation
10 *******************************************************************************/
11 import java.io.File;
12
13 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
14 import org.mod4j.mojo.Mod4jGeneratorMojo;
15
16 public class Mod4jGeneratorMojoTest extends AbstractMojoTestCase {
17
18 protected void setUp() throws Exception {
19 // Required for mojo lookups to work
20 super.setUp();
21 }
22
23 /**
24 * Tests the proper discovery and configuration of the mojo
25 *
26 * @throws Exception
27 */
28 public void testMod4jGeneratorMojo() throws Exception {
29
30 File testPom = new File(getBasedir(), "src/test/resources/testpom.xml");
31
32 Mod4jGeneratorMojo mojo = (Mod4jGeneratorMojo) lookupMojo("generateFromModel", testPom);
33 assertNotNull(mojo);
34 }
35 }