Package edu.ucsd.cs110w.temperature

Examples of edu.ucsd.cs110w.temperature.Temperature


    assertTrue(string.substring(0, endIndex).equals(beginning));
  }
  public void testFahrenheitToFahrenheit()
  {
    Fahrenheit temp = new Fahrenheit(0);
    Temperature convert = temp.toFahrenheit();
    assertEquals(0, convert.getValue(), delta);
  }
View Full Code Here


    Temperature convert = temp.toFahrenheit();
    assertEquals(0, convert.getValue(), delta);
  }
  public void testFahrenheitToCelsius(){
    Fahrenheit temp = new Fahrenheit(32);
    Temperature convert = temp.toCelsius();
    assertEquals(0, convert.getValue(), delta);
    temp = new Fahrenheit(212);
    convert = temp.toCelsius();
   
    assertEquals(100, convert.getValue(), delta);
  }
View Full Code Here

    assertEquals(100, convert.getValue(), delta);
  }
 
  public void testFahrenheitToKelvin(){
    Fahrenheit temp = new Fahrenheit(32);
    Temperature convert = temp.toKelvin();
    assertEquals(273, convert.getValue(), delta);
    temp = new Fahrenheit(212);
    convert = temp.toKelvin();
   
    assertEquals(373, convert.getValue(), delta);
  }
View Full Code Here

    assertTrue(string.substring(0, endIndex).equals(beginning));
  }
  public void testCelsiusToCelsius()
  {
    Celsius temp = new Celsius(0);
    Temperature convert = temp.toCelsius();
    assertEquals(0, convert.getValue(), delta);
  }
View Full Code Here

    Temperature convert = temp.toCelsius();
    assertEquals(0, convert.getValue(), delta);
  }
  public void testCelsiusToFahrenheit(){
    Celsius temp = new Celsius(0);
    Temperature convert = temp.toFahrenheit();
    assertEquals(32, convert.getValue(), delta);
    temp = new Celsius(100);
    convert = temp.toFahrenheit();
   
    assertEquals(212, convert.getValue(), delta);
  }
View Full Code Here

    assertEquals(212, convert.getValue(), delta);
  }
 
  public void testCelsiusToKelvin() {
    Celsius temp = new Celsius(0);
    Temperature convert = temp.toKelvin();
    assertEquals(273, convert.getValue(), delta);
    temp = new Celsius(100);
    convert = temp.toKelvin();
   
    assertEquals(373, convert.getValue(), delta);
  }
View Full Code Here

TOP

Related Classes of edu.ucsd.cs110w.temperature.Temperature

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.