88import eu .clarin .cmdi .curation .api .report .collection .CollectionReport ;
99import eu .clarin .cmdi .curation .api .report .instance .CMDInstanceReport ;
1010import eu .clarin .cmdi .curation .api .exception .MalFunctioningProcessorException ;
11+ import jakarta .annotation .PostConstruct ;
1112import lombok .extern .slf4j .Slf4j ;
1213import org .junit .jupiter .api .*;
1314import org .mockserver .springtest .MockServerTest ;
@@ -55,7 +56,7 @@ public class CollectionTest extends BaseTest {
5556 String xmlContent ;
5657
5758 @ Autowired
58- public CollectionTest (ApiConfig conf , CurationModule curation ) throws IOException {
59+ public CollectionTest (ApiConfig conf , CurationModule curation ) throws IOException , MalFunctioningProcessorException {
5960
6061
6162 this .conf = conf ;
@@ -92,10 +93,20 @@ public CollectionTest(ApiConfig conf, CurationModule curation) throws IOExceptio
9293
9394 Files .copy (file099Path , this .file099CopyPath , StandardCopyOption .REPLACE_EXISTING );
9495
95-
9696 }
9797 }
9898
99+ @ BeforeAll
100+ void createReferenceReports () {
101+
102+ // now we create a collection report from our collection
103+ assertDoesNotThrow (() -> this .collectionReport = this .curation .processCollection (this .collectionPath ));
104+
105+ // and an instance report in collection mode as reference
106+ assertDoesNotThrow (() -> this .instanceReport = this .curation .processCMDInstance (collectionPath .resolve ("001.xml" )));
107+
108+ }
109+
99110 @ AfterEach
100111 void replaceFile099 () {
101112
@@ -107,16 +118,6 @@ void replaceFile099() {
107118 log .error ("" , e );
108119 }
109120 }
110- @ Test
111- void aaCreateReferenceReports () {
112-
113- // now we create a collection report from our collection
114- assertDoesNotThrow (() -> this .collectionReport = this .curation .processCollection (this .collectionPath ));
115-
116- // and an instance report in collection mode as reference
117- assertDoesNotThrow (() -> this .instanceReport = this .curation .processCMDInstance (collectionPath .resolve ("001.xml" )));
118-
119- }
120121
121122 @ Test
122123 void collection () {
0 commit comments