-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from FHIR/2023-07-gg-fix-tests
2023 07 gg fix tests
- Loading branch information
Showing
2 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.fhir.ucum; | ||
|
||
import java.io.IOException; | ||
|
||
import static org.junit.Assert.assertThrows; | ||
|
||
import java.io.File; | ||
import java.io.InputStream; | ||
import java.io.FileInputStream; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
public class UcumTestsIssue13 { | ||
|
||
@Test | ||
public void testGigaYear() throws IOException, UcumException { | ||
|
||
String fileName = "ucum-essence.xml"; | ||
ClassLoader classLoader = getClass().getClassLoader(); | ||
File file = new File(classLoader.getResource(fileName).getFile()); | ||
|
||
InputStream inputStream = new FileInputStream(file); | ||
|
||
UcumEssenceService ucumService = new UcumEssenceService(inputStream); | ||
assertThrows(UcumException.class, () -> { | ||
ucumService.convert(new Decimal("0.1"), "Ga", "a"); | ||
}); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters