32 lines
770 B
Java
32 lines
770 B
Java
package pl.edu.amu.wmi.bookapi.Integration;
|
|
|
|
import com.mongodb.*;
|
|
import org.junit.jupiter.api.*;
|
|
import org.springframework.beans.factory.annotation.*;
|
|
import org.springframework.boot.test.context.*;
|
|
import org.springframework.data.mongodb.core.*;
|
|
import org.springframework.data.mongodb.core.query.*;
|
|
import pl.edu.amu.wmi.bookapi.models.*;
|
|
|
|
import java.util.*;
|
|
|
|
public class BaseInt {
|
|
public MongoTemplate mongoTemplate;
|
|
|
|
@Autowired
|
|
public BaseInt(MongoTemplate mongoTemplate) {
|
|
this.mongoTemplate = mongoTemplate;
|
|
}
|
|
|
|
@BeforeAll
|
|
public void cleanUp() {
|
|
List.of(
|
|
UserDocument.class
|
|
).forEach(it -> this.mongoTemplate.remove(it));
|
|
|
|
System.out.println("Removing classes in cleanUp method");
|
|
|
|
}
|
|
|
|
}
|