Skip to content

Commit

Permalink
Add tests for the writing examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmudd committed Jul 21, 2024
1 parent 8256495 commit 90a26bc
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
19 changes: 19 additions & 0 deletions jhdf/src/test/java/io/jhdf/examples/WriteAttributesTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package io.jhdf.examples;

import org.junit.jupiter.api.Test;

import java.nio.file.Files;
import java.nio.file.Paths;

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertTrue;

class WriteAttributesTest {
@Test
void testWriteAttributes() {
assertDoesNotThrow(() ->
WriteAttributes.main(new String[]{}));

assertTrue(Files.exists(Paths.get("attributes.hdf5")));
}
}
20 changes: 20 additions & 0 deletions jhdf/src/test/java/io/jhdf/examples/WriteHdf5Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package io.jhdf.examples;

import org.junit.jupiter.api.Test;

import java.nio.file.Files;
import java.nio.file.Paths;

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertTrue;

class WriteHdf5Test {

@Test
void testWriteHdf5() {
assertDoesNotThrow(() ->
WriteHdf5.main(new String[]{}));

assertTrue(Files.exists(Paths.get("jhdf.hdf5")));
}
}

0 comments on commit 90a26bc

Please sign in to comment.