mojo/src/main/resources/archetype-resources/src/test/java/AppTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 22 Jan 2013 09:19:47 +0100
branchmodel
changeset 528 08cd5a0c967e
parent 514 javaquery/demo-calculator-dynamic/src/test/java/org/apidesign/bck2brwsr/demo/calc/CalcTest.java@f761555d8312
child 534 3cefccd50bd5
permissions -rw-r--r--
Archetype using the @Property model
     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.
     8  *
     9  * @author Jaroslav Tulach <jtulach@netbeans.org>
    10  */
    11 public class AppTest {
    12     private Index model;
    13     
    14 
    15     @BeforeMethod
    16     public void initModel() {
    17         model = new Index().applyBindings();
    18     }
    19 
    20     @Test public void testHelloMessage() {
    21         model.setName("Joe");
    22         assertEquals(model.getHelloMessage(), "Hello Joe!", "Cleared after pressing +");
    23     }
    24 }