Skip to content

Commit 650c0dd

Browse files
committed
balking, bloc
1 parent 6b537d9 commit 650c0dd

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

balking/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@
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>

bloc/pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
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>
@@ -53,11 +53,6 @@
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>

bloc/src/test/java/com/iluwatar/bloc/BlocUiTest.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
*/
2525
package 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

3131
import javax.swing.*;
3232
import java.awt.*;
3333

34-
import static org.junit.Assert.assertEquals;
34+
import static org.junit.jupiter.api.Assertions.assertEquals;
3535

3636
public 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+
}

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
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>-->

0 commit comments

Comments
 (0)