rt/mojo/src/main/resources/archetype-resources/src/test/java/AppTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 26 Feb 2013 16:54:16 +0100
changeset 772 d382dacfd73f
parent 534 mojo/src/main/resources/archetype-resources/src/test/java/AppTest.java@3cefccd50bd5
permissions -rw-r--r--
Moving modules around so the runtime is under one master pom and can be built without building other modules that are in the repository
     1 package ${package};
     2 
     3 import static org.testng.Assert.*;
     4 import org.testng.annotations.BeforeMethod;
     5 import org.testng.annotations.Test;
     6 
     7 /** Demonstrating POJO testing of HTML page model. Runs in good old HotSpot
     8  * as it does not reference any HTML elements or browser functionality. Just
     9  * operates on the page model.
    10  *
    11  * @author Jaroslav Tulach <jtulach@netbeans.org>
    12  */
    13 public class AppTest {
    14     private Index model;
    15     
    16 
    17     @BeforeMethod
    18     public void initModel() {
    19         model = new Index().applyBindings();
    20     }
    21 
    22     @Test public void testHelloMessage() {
    23         model.setName("Joe");
    24         assertEquals(model.getHelloMessage(), "Hello Joe!", "Cleared after pressing +");
    25     }
    26 }