Last active
June 15, 2023 18:19
-
-
Save Mycoola/71b7ea2e3a46b8dde7eac5de62262946 to your computer and use it in GitHub Desktop.
Created with Copy to Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
public class TemperatureConvertorTest { | |
@isTest static void testWarmTemp() | |
{ | |
Decimal celsius=TemperatureConvertor.FahrenheitToCelsius(70); | |
System.assertEquals(21.11, celsius); | |
} | |
@isTest static void testFreezingPoint() | |
{ | |
Decimal celsius=TemperatureConvertor.FahrenheitToCelsius(32); | |
System.assertEquals(0,celsius); | |
} | |
@isTest static void testBoilingPoint() | |
{ | |
Decimal celsius=TemperatureConvertor.FahrenheitToCelsius(212); | |
System.assertEquals(100,celsius,'Boiling point temperature is not expected '); | |
} | |
@isTest static void testNegativeTemp() | |
{ | |
Decimal celsius=TemperatureConvertor.FahrenheitToCelsius(-10); | |
System.assertEquals(-23.33,celsius); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment