File tree Expand file tree Collapse file tree 4 files changed +18
-16
lines changed
src/test/java/com/iluwatar/bloc Expand file tree Collapse file tree 4 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 3434 <modelVersion >4.0.0</modelVersion >
3535 <artifactId >balking</artifactId >
3636 <dependencies >
37+ <dependency >
38+ <groupId >org.slf4j</groupId >
39+ <artifactId >slf4j-api</artifactId >
40+ </dependency >
41+ <dependency >
42+ <groupId >ch.qos.logback</groupId >
43+ <artifactId >logback-classic</artifactId >
44+ </dependency >
3745 <dependency >
3846 <groupId >org.junit.jupiter</groupId >
3947 <artifactId >junit-jupiter-engine</artifactId >
Original file line number Diff line number Diff line change 3838 <dependencies >
3939 <dependency >
4040 <groupId >org.junit.jupiter</groupId >
41- <artifactId >junit-jupiter-api </artifactId >
41+ <artifactId >junit-jupiter-engine </artifactId >
4242 <scope >test</scope >
4343 </dependency >
4444 <dependency >
5353 <version >3.27.3</version >
5454 <scope >test</scope >
5555 </dependency >
56- <dependency >
57- <groupId >junit</groupId >
58- <artifactId >junit</artifactId >
59- <scope >test</scope >
60- </dependency >
6156 </dependencies >
6257 <build >
6358 <plugins >
Original file line number Diff line number Diff line change 2424 */
2525package com .iluwatar .bloc ;
2626
27- import org .junit .After ;
28- import org .junit .Before ;
29- import org .junit .Test ;
27+ import org .junit .jupiter . api . AfterEach ;
28+ import org .junit .jupiter . api . BeforeEach ;
29+ import org .junit .jupiter . api . Test ;
3030
3131import javax .swing .*;
3232import java .awt .*;
3333
34- import static org .junit .Assert .assertEquals ;
34+ import static org .junit .jupiter . api . Assertions .assertEquals ;
3535
3636public class BlocUiTest {
3737
@@ -43,7 +43,7 @@ public class BlocUiTest {
4343 private Bloc bloc ;
4444 private StateListener <State > stateListener ;
4545
46- @ Before
46+ @ BeforeEach
4747 public void setUp () {
4848 bloc = new Bloc (); // Re-initialize the Bloc for each test
4949
@@ -82,13 +82,12 @@ public void setUp() {
8282 frame .setVisible (true );
8383 }
8484
85- @ After
85+ @ AfterEach
8686 public void tearDown () {
8787 frame .dispose ();
8888 bloc = new Bloc (); // Reset Bloc state after each test to avoid state carryover
8989 }
9090
91-
9291 @ Test
9392 public void testIncrementButton () {
9493 simulateButtonClick (incrementButton );
@@ -119,4 +118,4 @@ private void simulateButtonClick(JButton button) {
119118 listener .actionPerformed (null );
120119 }
121120 }
122- }
121+ }
Original file line number Diff line number Diff line change 7171<!-- <module>anti-corruption-layer</module>-->
7272 <module >arrange-act-assert</module >
7373 <module >async-method-invocation</module >
74- <!-- <module>balking</module> -- >
75- <!-- <module>bloc</module> -- >
74+ <module >balking</module >
75+ <module >bloc</module >
7676<!-- <module>bridge</module>-->
7777<!-- <module>builder</module>-->
7878<!-- <module>business-delegate</module>-->
You can’t perform that action at this time.
0 commit comments