Package ise.mace.models

Examples of ise.mace.models.ScaledDouble


   * Test of intValue method, of class ScaledDouble.
   */
  @Test
  public void testScaling_1()
  {
    ScaledDouble instance = new ScaledDouble();

    instance.setValue(-1);
    double expResult = 0.4524;
    double result = instance.doubleValue();
    assertEquals(expResult, result, 0.0001);
  }
View Full Code Here


   * Test of intValue method, of class ScaledDouble.
   */
  @Test
  public void testInit_1()
  {
    ScaledDouble instance = new ScaledDouble(0.54758);

    int expResult = 1;
    int result = instance.intValue();
    assertEquals(expResult, result);
  }
View Full Code Here

   * Test of intValue method, of class ScaledDouble.
   */
  @Test
  public void testInit_14()
  {
    ScaledDouble instance = new ScaledDouble(0.87670);

    int expResult = 14;
    int result = instance.intValue();
    assertEquals(expResult, result);
  }
View Full Code Here

   * Test of intValue method, of class ScaledDouble.
   */
  @Test
  public void testInit_m14()
  {
    ScaledDouble instance = new ScaledDouble(0.1233);

    int expResult = -14;
    int result = instance.intValue();
    assertEquals(expResult, result);
  }
View Full Code Here

   * Test of intValue method, of class ScaledDouble.
   */
  @Test
  public void testScaling_2()
  {
    ScaledDouble instance = new ScaledDouble();

    instance.setValue(-3);
    instance.alterValue(5);
    instance.alterValue(-2);

    double expResult = 0.5;
    double result = instance.doubleValue();
    assertEquals(expResult, result, 0.0);
  }
View Full Code Here

   * Test of floatValue method, of class ScaledDouble.
   */
  @Test
  public void testInitialValue()
  {
    ScaledDouble instance = new ScaledDouble();
    double expResult = 0.5;
    double result = instance.doubleValue();
    assertEquals(expResult, result, 0.0);
  }
View Full Code Here

   * Test of doubleValue method, of class ScaledDouble.
   */
  @Test
  public void testTinyNegativeValue()
  {
    ScaledDouble instance = new ScaledDouble(1000000);

    instance.setValue(-1);
    double expResult = 0.5;
    double result = instance.doubleValue();
    assertEquals(expResult, result, 0.001);
  }
View Full Code Here

TOP

Related Classes of ise.mace.models.ScaledDouble

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.