Skip to content
Snippets Groups Projects
Commit d05c0394 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4949 Clear Monogdb before each test instead of after

parent 7debb677
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -8,7 +8,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import java.util.List; import java.util.List;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
...@@ -52,7 +51,7 @@ class PostfachITCase { ...@@ -52,7 +51,7 @@ class PostfachITCase {
.settingsBody(PostfachTestFactory.create()) .settingsBody(PostfachTestFactory.create())
.build(); .build();
@AfterEach @BeforeEach
void clear() { void clear() {
mongoOperations.dropCollection(Settings.class); mongoOperations.dropCollection(Settings.class);
} }
...@@ -236,7 +235,6 @@ class PostfachITCase { ...@@ -236,7 +235,6 @@ class PostfachITCase {
@BeforeEach @BeforeEach
void init() { void init() {
mongoOperations.dropCollection(Settings.class);
id = mongoOperations.save(settingsWithPostfach).getId(); id = mongoOperations.save(settingsWithPostfach).getId();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment