Skip to content

Commit a1a464b

Browse files
Add initialisation setup
1 parent ac820f6 commit a1a464b

File tree

1 file changed

+11
-1
lines changed
  • zebedee-reader/src/test/java/com/github/onsdigital/zebedee/reader/api/endpoint

1 file changed

+11
-1
lines changed

zebedee-reader/src/test/java/com/github/onsdigital/zebedee/reader/api/endpoint/TaxonomyTest.java

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33

44
import com.github.onsdigital.zebedee.exceptions.ZebedeeException;
5+
import com.github.onsdigital.zebedee.reader.configuration.ReaderConfiguration;
6+
7+
import org.junit.Before;
58
import org.junit.Test;
69
import org.junit.runner.RunWith;
710
import org.mockito.Mock;
11+
import org.mockito.MockitoAnnotations;
812
import org.mockito.junit.MockitoJUnitRunner;
913

1014
import javax.servlet.http.HttpServletResponse;
@@ -25,6 +29,12 @@ public class TaxonomyTest {
2529
private HttpServletResponse mockResponse;
2630

2731

32+
@Before
33+
public void initialize() {
34+
MockitoAnnotations.openMocks(this);
35+
ReaderConfiguration.init("target/test-classes/test-content/");
36+
}
37+
2838
@Test
2939
public void taxonomy() throws ZebedeeException, IOException {
3040
assertThrows(RuntimeException.class, () -> {
@@ -33,4 +43,4 @@ public void taxonomy() throws ZebedeeException, IOException {
3343
verify(mockResponse, atLeastOnce()).addHeader("Cache-Control", "max-age=" + 1800 + ", public");
3444

3545
}
36-
}
46+
}

0 commit comments

Comments
 (0)