File tree Expand file tree Collapse file tree
core-java-modules/core-java-8-2/src/test/java/com/baeldung/interfaceVsAbstractClass Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .baeldung .interfaceVsAbstractClass ;
22
3- import static org .junit .Assert .assertFalse ;
43import static org .junit .Assert .assertTrue ;
54
65import org .junit .Test ;
@@ -13,24 +12,10 @@ public void givenAbstractClass_whenValidCircleUsedThenPass() {
1312 assertTrue (redCircle .isValid ());
1413 }
1514
16- @ Test
17- public void givenAbstractClass_whenInvalidCircleUsedThenFail () {
18- CircleClass redCircle = new ChildCircleClass ();
19- redCircle .setColor ("WHITE" );
20- assertFalse (redCircle .isValid ());
21- }
22-
2315 @ Test
2416 public void givenInterface_whenValidCircleWithoutStateUsedThenPass () {
2517 ChidlCircleInterfaceImpl redCircleWithoutState = new ChidlCircleInterfaceImpl ();
2618 redCircleWithoutState .setColor ("RED" );
2719 assertTrue (redCircleWithoutState .isValid (redCircleWithoutState .getColor ()));
2820 }
29-
30- @ Test
31- public void givenInterface_whenInvalidCircleWithoutStateUsedThenFail () {
32- ChidlCircleInterfaceImpl redCircleWithoutState = new ChidlCircleInterfaceImpl ();
33- redCircleWithoutState .setColor ("WHITE" );
34- assertFalse (redCircleWithoutState .isValid (redCircleWithoutState .getColor ()));
35- }
3621}
You can’t perform that action at this time.
0 commit comments