samples/singletons/test/org/apidesign/singletons/usage/MainTest.java
changeset 407 e1439046d96e
parent 344 3ba131907351
     1.1 --- a/samples/singletons/test/org/apidesign/singletons/usage/MainTest.java	Wed Jan 27 19:04:13 2010 +0100
     1.2 +++ b/samples/singletons/test/org/apidesign/singletons/usage/MainTest.java	Sun Oct 06 22:05:14 2013 +0200
     1.3 @@ -6,11 +6,8 @@
     1.4  import org.netbeans.junit.MockServices;
     1.5  import static org.junit.Assert.*;
     1.6  
     1.7 +// BEGIN: singletons.injectable.test
     1.8  public class MainTest {
     1.9 -
    1.10 -    public MainTest() {
    1.11 -    }
    1.12 -
    1.13      @BeforeClass
    1.14      public static void setUpClass() throws Exception {
    1.15          MockServices.setServices(MockDialogDisplayer.class);
    1.16 @@ -18,9 +15,14 @@
    1.17  
    1.18      @Test
    1.19      public void testMainAsksAQuestion() {
    1.20 -        assertNull("No question asked yet", MockDialogDisplayer.askedQuery);
    1.21 +        assertNull(
    1.22 +            "No question asked yet", MockDialogDisplayer.askedQuery
    1.23 +        );
    1.24          Main.main(new String[0]);
    1.25 -        assertNotNull("main code asked our Mock displayer", MockDialogDisplayer.askedQuery);
    1.26 +        assertNotNull(
    1.27 +            "main code asked our Mock displayer",
    1.28 +            MockDialogDisplayer.askedQuery
    1.29 +        );
    1.30      }
    1.31  
    1.32      public static final class MockDialogDisplayer extends DialogDisplayer {
    1.33 @@ -31,6 +33,6 @@
    1.34              askedQuery = query;
    1.35              return false;
    1.36          }
    1.37 -
    1.38      }
    1.39 -}
    1.40 \ No newline at end of file
    1.41 +}
    1.42 +// END: singletons.injectable.test