Package org.kocakosm.pitaya.math

Examples of org.kocakosm.pitaya.math.Fraction


  }

  @Test
  public void testInstanciation()
  {
    assertEquals(ONE_QUARTER, new Fraction(1, 4));
  }
View Full Code Here


  }

  @Test(expected = IllegalArgumentException.class)
  public void testInstanciationWithInvalidDenominator()
  {
    new Fraction(42, 0);
  }
View Full Code Here

  }

  @Test
  public void testNumerator()
  {
    Fraction f = valueOf("42 / 16");
    assertEquals(42, f.numerator().intValue());
  }
View Full Code Here

  }

  @Test
  public void testDenominator()
  {
    Fraction f = valueOf("42 / 16");
    assertEquals(16, f.denominator().intValue());
  }
View Full Code Here

TOP

Related Classes of org.kocakosm.pitaya.math.Fraction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.