Example #1
0
 @Test
 public void getValueTest_Fahrenheit_KelvinEqualToZero() {
   Temperature fahrenheitTemperature = new Temperature(-459.67, Temperature.Units.FAHRENHEIT);
   assertEquals(-459.67, fahrenheitTemperature.getValue(), 0);
 }
Example #2
0
 // getValue() test for Fahrenheit
 @Test
 public void getValueTest_Fahrenheit() {
   Temperature fahrenheitTemperature = new Temperature(0, Temperature.Units.FAHRENHEIT);
   assertEquals(0, fahrenheitTemperature.getValue(), 0);
 }
Example #3
0
 // getValue() test for Celsius
 @Test
 public void getValueTest_Celsius() {
   Temperature celciusTemperature = new Temperature(0, Temperature.Units.CELSIUS);
   assertEquals(0, celciusTemperature.getValue(), 0);
 }
Example #4
0
 @Test
 public void getValueTest_Celsius_KelvinEqualToZero() {
   Temperature celciusTemperature = new Temperature(-273.15, Temperature.Units.CELSIUS);
   assertEquals(-273.15, celciusTemperature.getValue(), 0);
 }
Example #5
0
 // getValue() test for Kelvin
 @Test
 public void getValueTest_Kelvin() {
   Temperature kelvinTemperature = new Temperature(0, Temperature.Units.KELVIN);
   assertEquals(0, kelvinTemperature.getValue(), 0);
 }