|
11 | 11 |
|
12 | 12 | public class DelegateTest { |
13 | 13 |
|
14 | | - private static final String MESSAGE = "Test Message Printed"; |
| 14 | + private static final String MESSAGE = "Test Message Printed"; |
15 | 15 |
|
16 | | - @Rule |
17 | | - public final SystemOutRule systemOutRule = new SystemOutRule().enableLog(); |
| 16 | + @Rule |
| 17 | + public final SystemOutRule systemOutRule = new SystemOutRule().enableLog(); |
18 | 18 |
|
19 | | - @Test |
20 | | - public void testCanonPrinter() throws Exception { |
21 | | - AbstractPrinterController abstractController = new PrinterController(new CanonPrinter()); |
22 | | - abstractController.print(MESSAGE); |
| 19 | + @Test |
| 20 | + public void testCanonPrinter() throws Exception { |
| 21 | + AbstractPrinterController abstractController = new PrinterController(new CanonPrinter()); |
| 22 | + abstractController.print(MESSAGE); |
23 | 23 |
|
24 | | - assertEquals("Canon Printer : Test Message Printed\n", systemOutRule.getLog()); |
25 | | - } |
| 24 | + assertEquals("Canon Printer : Test Message Printed\n", systemOutRule.getLog()); |
| 25 | + } |
26 | 26 |
|
27 | | - @Test |
28 | | - public void testHPPrinter() throws Exception { |
29 | | - AbstractPrinterController abstractController = new PrinterController(new HpPrinter()); |
30 | | - abstractController.print(MESSAGE); |
| 27 | + @Test |
| 28 | + public void testHpPrinter() throws Exception { |
| 29 | + AbstractPrinterController abstractController = new PrinterController(new HpPrinter()); |
| 30 | + abstractController.print(MESSAGE); |
31 | 31 |
|
32 | | - assertEquals("HP Printer : Test Message Printed\n", systemOutRule.getLog()); |
33 | | - } |
| 32 | + assertEquals("HP Printer : Test Message Printed\n", systemOutRule.getLog()); |
| 33 | + } |
34 | 34 |
|
35 | | - @Test |
36 | | - public void testEpsonPrinter() throws Exception { |
37 | | - AbstractPrinterController abstractController = new PrinterController(new EpsonPrinter()); |
38 | | - abstractController.print(MESSAGE); |
| 35 | + @Test |
| 36 | + public void testEpsonPrinter() throws Exception { |
| 37 | + AbstractPrinterController abstractController = new PrinterController(new EpsonPrinter()); |
| 38 | + abstractController.print(MESSAGE); |
39 | 39 |
|
40 | | - assertEquals("Epson Printer : Test Message Printed\n", systemOutRule.getLog()); |
41 | | - } |
| 40 | + assertEquals("Epson Printer : Test Message Printed\n", systemOutRule.getLog()); |
| 41 | + } |
42 | 42 |
|
43 | 43 | } |
0 commit comments