Created
July 9, 2021 20:42
-
-
Save LionelBeato/738af85dcf3d958664b0d3e4c425009e to your computer and use it in GitHub Desktop.
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
import main.Utility; | |
import org.junit.jupiter.api.Test; | |
import static org.junit.jupiter.api.Assertions.assertEquals; | |
import static org.junit.jupiter.api.Assertions.fail; | |
public class SimpleTest { | |
@Test | |
public void myTest() { | |
// fail("This test will fail"); | |
int expected = 5; | |
int actual = 5; | |
assertEquals(expected, actual); | |
} | |
@Test | |
public void testClass() { | |
double expected = 10.234543; | |
double actual = Utility.add(10, 0.234543); | |
assertEquals(expected, actual); | |
} | |
} |
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
package main; | |
public class Utility { | |
public static double add(int x, double y) { | |
return x + y; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment