1.1 --- a/samples/componentinjection/test/org/apidesign/component/InjectionSlotTest.java Sat Jun 14 09:58:08 2008 +0200
1.2 +++ b/samples/componentinjection/test/org/apidesign/component/InjectionSlotTest.java Sat Jun 14 09:58:11 2008 +0200
1.3 @@ -14,7 +14,8 @@
1.4 @BeforeClass
1.5 public static void setUpClass() throws Exception {
1.6 // this is a support for "dynamic" registration of any class
1.7 - // into the global pool of Lookup.getDefault() and java.util.ServiceLoader
1.8 + // into the global pool of Lookup.getDefault() and
1.9 + // java.util.ServiceLoader
1.10 // either in @BeforeClass or @Before register
1.11 // classes of the mock instances that you want your code
1.12 // to find
1.13 @@ -25,16 +26,23 @@
1.14 public void singleSlot() {
1.15 InjectionSlot result = InjectionSlot.singleSlot();
1.16 assertNotNull("Some result found", result);
1.17 - assertEquals("The first is ImplOne", ImplOne.class, result.getClass());
1.18 + assertEquals(
1.19 + "The first is ImplOne", ImplOne.class, result.getClass()
1.20 + );
1.21 }
1.22
1.23 @Test
1.24 public void multiSlot() {
1.25 - Iterator<? extends InjectionSlot> it = InjectionSlot.multiSlot().iterator();
1.26 + Iterator<? extends InjectionSlot> it =
1.27 + InjectionSlot.multiSlot().iterator();
1.28 assertTrue("Has at least one", it.hasNext());
1.29 - assertEquals("The first is ImplOne", ImplOne.class, it.next().getClass());
1.30 + assertEquals(
1.31 + "The first is ImplOne", ImplOne.class, it.next().getClass()
1.32 + );
1.33 assertTrue("Has two", it.hasNext());
1.34 - assertEquals("The second is ImplTwo", ImplTwo.class, it.next().getClass());
1.35 + assertEquals(
1.36 + "The second is ImplTwo", ImplTwo.class, it.next().getClass()
1.37 + );
1.38 assertFalse("No other instance registered", it.hasNext());
1.39 }
1.40