-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Task-Url: #59
- Loading branch information
Showing
4 changed files
with
21 additions
and
3 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
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
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 |
---|---|---|
|
@@ -61,6 +61,8 @@ | |
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import tech.units.indriya.ComparableUnit; | ||
|
||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Werner Keil</a> | ||
|
@@ -401,8 +403,17 @@ public void testFormatUCUMPrintWithPositivePrefix() { | |
@Test | ||
public void testNewton() { | ||
final UnitFormat format = UCUMFormat.getInstance(PRINT); | ||
Unit newton = KILO(GRAM).multiply(METER).divide(SECOND).divide(SECOND); | ||
ComparableUnit newton = (ComparableUnit) KILO(GRAM).multiply(METER).divide(SECOND).divide(SECOND); | ||
assertTrue(newton.isEquivalentTo(NEWTON)); | ||
assertEquals("kg.m/s2", format.format(newton)); | ||
} | ||
|
||
|
||
@Test | ||
public void testBaud() { | ||
final UnitFormat format = UCUMFormat.getInstance(PRINT); | ||
assertEquals("Bd", format.format(BAUD)); | ||
final UnitFormat formatCS = UCUMFormat.getInstance(CASE_SENSITIVE); | ||
assertEquals(BAUD, formatCS.parse("Bd")); | ||
} | ||
} |
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