Created
January 23, 2014 16:40
-
-
Save GLitchfield/8581956 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public static final ValueFactory vals = new ValueFactoryImpl(); | |
@Test | |
public void testPriceText() { | |
Price p1 = vals.newPrice(-5, -1); | |
Price p2 = vals.newPrice(-5, 0); | |
Price p3 = vals.newPrice(5, -1); | |
Price p4 = vals.newPrice(5, 0); | |
Fraction f = vals.newFraction(10, -1); | |
assertTrue(priceText(p1, f).equals("-0.5")); | |
assertTrue(priceText(p2, f).equals("-5.0")); | |
assertTrue(priceText(p3, f).equals("0.5")); | |
assertTrue(priceText(p4, f).equals("5.0")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment