Skip to content

Commit f60e75f

Browse files
committed
added missing before/after test annotations.
1 parent b97238a commit f60e75f

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

app/src/test/java/org/apache/roller/weblogger/business/CommentTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
import java.io.PrintWriter;
2929
import java.io.StringWriter;
3030
import java.util.List;
31+
import org.junit.jupiter.api.AfterEach;
32+
import org.junit.jupiter.api.BeforeEach;
3133

3234
import static org.junit.jupiter.api.Assertions.*;
3335

@@ -48,6 +50,7 @@ public class CommentTest {
4850
/**
4951
* All tests in this suite require a user, weblog, and an entry.
5052
*/
53+
@BeforeEach
5154
public void setUp() throws Exception {
5255

5356
// setup weblogger
@@ -63,7 +66,8 @@ public void setUp() throws Exception {
6366
throw new Exception("Test setup failed", ex);
6467
}
6568
}
66-
69+
70+
@AfterEach
6771
public void tearDown() throws Exception {
6872

6973
try {

app/src/test/java/org/apache/roller/weblogger/business/MediaFileTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import java.io.File;
3333
import java.sql.Timestamp;
3434
import java.util.*;
35+
import org.junit.jupiter.api.BeforeEach;
3536

3637
import static org.junit.jupiter.api.Assertions.*;
3738

@@ -47,13 +48,11 @@ public class MediaFileTest {
4748
public MediaFileTest() {
4849
}
4950

51+
@BeforeEach
5052
public void setUp() throws Exception {
5153
TestUtils.setupWeblogger();
5254
}
5355

54-
public void tearDown() throws Exception {
55-
}
56-
5756
/**
5857
* Test creation of directory by path
5958
*/

0 commit comments

Comments
 (0)