mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-19 15:27:13 +00:00
docs: update delegation
This commit is contained in:
@@ -35,7 +35,6 @@ class AppTest {
|
||||
|
||||
/**
|
||||
* Issue: Add at least one assertion to this test case.
|
||||
*
|
||||
* Solution: Inserted assertion to check whether the execution of the main method in {@link App#main(String[])}
|
||||
* throws an exception.
|
||||
*/
|
||||
|
||||
@@ -59,7 +59,7 @@ class DelegateTest {
|
||||
private static final String MESSAGE = "Test Message Printed";
|
||||
|
||||
@Test
|
||||
void testCanonPrinter() throws Exception {
|
||||
void testCanonPrinter() {
|
||||
var printerController = new PrinterController(new CanonPrinter());
|
||||
printerController.print(MESSAGE);
|
||||
|
||||
@@ -67,7 +67,7 @@ class DelegateTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testHpPrinter() throws Exception {
|
||||
void testHpPrinter() {
|
||||
var printerController = new PrinterController(new HpPrinter());
|
||||
printerController.print(MESSAGE);
|
||||
|
||||
@@ -75,7 +75,7 @@ class DelegateTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testEpsonPrinter() throws Exception {
|
||||
void testEpsonPrinter() {
|
||||
var printerController = new PrinterController(new EpsonPrinter());
|
||||
printerController.print(MESSAGE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user