Ejemplo n.º 1
0
 public void getUnitTest_Fahrenheit() {
   Temperature fahrenheitTemperature = new Temperature(0, Temperature.Units.FAHRENHEIT);
   assertEquals(Temperature.Units.FAHRENHEIT, fahrenheitTemperature.getUnits());
 }
Ejemplo n.º 2
0
 // changeUnits() test for Kelvin
 @Test
 public void changeUnitsTestForKELVINToCELSIUS() {
   Temperature kelvinTemperature = new Temperature(0, Temperature.Units.KELVIN);
   kelvinTemperature.changeUnits(Temperature.Units.CELSIUS);
   assertEquals(Temperature.Units.CELSIUS, kelvinTemperature.getUnits());
 }
Ejemplo n.º 3
0
 @Test
 public void getUnitTest_Kelvin() {
   Temperature kelvinTemperature = new Temperature(0, Temperature.units.KELVIN);
   assertEquals(Temperature.Units.KELVIN, kelvinTemperature.getUnits());
 }
Ejemplo n.º 4
0
 @Test
 public void getUnitTest_Celsius() {
   Temperature celciusTemperature = new Temperature(0, Temperature.Units.CELSIUS);
   assertEquals(Temperature.Units.CELSIUS, celciusTemperature.getUnits());
 }
Ejemplo n.º 5
0
 @Test
 public void changeUnitsTestForFAHRENHEITToCELSIUS() {
   Temperature fahrenheitTemperature = new Temperature(0, Temperature.Units.FAHRENHEIT);
   fahrenheitTemperature.changeUnits(Temperature.Units.CELSIUS);
   assertEquals(Temperature.Units.CELSIUS, fahrenheitTemperature.getUnits());
 }
Ejemplo n.º 6
0
 // changeUnits() test for Fahrenheit
 @Test
 public void changeUnitsTestForFAHRENHEITToKELVIN() {
   Temperature fahrenheitTemperature = new Temperature(0, Temperature.Units.FAHRENHEIT);
   fahrenheitTemperature.changeUnits(Temperature.Units.KELVIN);
   assertEquals(Temperature.Units.KELVIN, fahrenheitTemperature.getUnits());
 }
Ejemplo n.º 7
0
 @Test
 public void changeUnitsTestForCELSIUSToFAHRENHEIT() {
   Temperature celciusTemperature = new Temperature(0, Temperature.Units.CELSIUS);
   celciusTemperature.changeUnits(Temperature.Units.FAHRENHEIT);
   assertEquals(Temperature.Units.FAHRENHEIT, celciusTemperature.getUnits());
 }
Ejemplo n.º 8
0
 // changeUnits() test for Celsius
 @Test
 public void changeUnitsTestForCELSIUSToKELVIN() {
   Temperature celciusTemperature = new Temperature(0, Temperature.Units.CELSIUS);
   celciusTemperature.changeUnits(Temperature.Units.KELVIN);
   assertEquals(Temperature.Units.KELVIN, celciusTemperature.getUnits());
 }
Ejemplo n.º 9
0
 @Test
 public void changeUnitsTestForKELVINToFAHRENHEIT() {
   Temperature kelvinTemperature = new Temperature(0, Temperature.Units.KELVIN);
   kelvinTemperature.changeUnits(Temperature.Units.FAHRENHEIT);
   assertEquals(Temperature.Units.FAHRENHEIT, kelvinTemperature.getUnits());
 }