File tree Expand file tree Collapse file tree
src/test/java/edu/kit/datamanager/ro_crate/crate/realexamples Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212import edu .kit .datamanager .ro_crate .entities .data .DataSetEntity ;
1313import edu .kit .datamanager .ro_crate .entities .data .FileEntity ;
1414import edu .kit .datamanager .ro_crate .externalproviders .personprovider .OrcidProvider ;
15- import edu .kit .datamanager .ro_crate .reader .CrateReader ;
1615import edu .kit .datamanager .ro_crate .reader .Readers ;
1716
1817import org .apache .commons .io .FileUtils ;
2322import java .nio .charset .Charset ;
2423import java .nio .file .Path ;
2524import static org .junit .jupiter .api .Assertions .assertEquals ;
25+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
2626
27- class RealTest {
28-
29- @ SuppressWarnings ("java:S2699" ) // disable warning about missing assertions
27+ class RealTest
28+ {
3029 @ Test
3130 void testWithIDRCProject (@ TempDir Path temp ) throws IOException {
32-
33- CrateReader <String > reader = Readers .newFolderReader ();
3431 final String locationMetadataFile = "/crates/other/idrc_project/ro-crate-metadata.json" ;
35- Crate crate = reader .readCrate (RealTest .class .getResource ("/crates/other/idrc_project" ).getPath ());
32+ Crate crate = Readers .newFolderReader ()
33+ .readCrate (RealTest .class .getResource ("/crates/other/idrc_project" ).getPath ());
3634
35+ assertNotNull (crate );
3736 HelpFunctions .compareCrateJsonToFileInResources (crate , locationMetadataFile );
3837
3938 Path newFile = temp .resolve ("new_file.txt" );
@@ -47,6 +46,7 @@ void testWithIDRCProject(@TempDir Path temp) throws IOException {
4746 .build ());
4847
4948 PersonEntity person = OrcidProvider .getPerson ("https://orcid.org/0000-0001-9842-9718" );
49+ assertNotNull (person );
5050 crate .addContextualEntity (person );
5151
5252 // problem
You can’t perform that action at this time.
0 commit comments