diff options
| author | mokha <mokha@cisco.com> | 2019-05-05 19:36:09 -0600 |
|---|---|---|
| committer | mokha <mokha@cisco.com> | 2019-05-05 19:36:09 -0600 |
| commit | 3c2be35d16d7482442911f5b06b68512f86e15b5 (patch) | |
| tree | 636edf7d09f2cc0b2f006c058071ce5b3d9adda6 /src/test/java/ca/mokhan/assignment1/BanffMarathonRunnerTest.java | |
| parent | 46e409f3ca33ec3c7546d0589301c2a4f967c10a (diff) | |
butcher default directory structure to make instructor happy
Diffstat (limited to 'src/test/java/ca/mokhan/assignment1/BanffMarathonRunnerTest.java')
| -rw-r--r-- | src/test/java/ca/mokhan/assignment1/BanffMarathonRunnerTest.java | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/test/java/ca/mokhan/assignment1/BanffMarathonRunnerTest.java b/src/test/java/ca/mokhan/assignment1/BanffMarathonRunnerTest.java deleted file mode 100644 index 4b04ae0..0000000 --- a/src/test/java/ca/mokhan/assignment1/BanffMarathonRunnerTest.java +++ /dev/null @@ -1,61 +0,0 @@ -package ca.mokhan.assignment1; - -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -public class BanffMarathonRunnerTest extends TestCase { - private BanffMarathonRunner john = new BanffMarathonRunner("John", "Lenthen", 243, 1); - private BanffMarathonRunner kate = new BanffMarathonRunner("Kate", "Hen", 265, 8); - private BanffMarathonRunner[] runners = { - new BanffMarathonRunner("Elena", "Brandon", 341, 1), - new BanffMarathonRunner("Thomas", "Molson", 273, 2), - new BanffMarathonRunner("Hamilton", "Winn", 278, 5), - new BanffMarathonRunner("Suzie", "Sarandin", 329, 7), - new BanffMarathonRunner("Philip", "Winne", 445, 9), - new BanffMarathonRunner("Alex", "Trebok", 275, 3), - new BanffMarathonRunner("Emma", "Pivoto", 275, 4), - this.john, - new BanffMarathonRunner("James", "Lean", 334, 1), - new BanffMarathonRunner("Jane", "Ostin", 412, 1), - new BanffMarathonRunner("Emily", "Car", 393, 4), - new BanffMarathonRunner("Daniel", "Hamshire", 299, 4), - new BanffMarathonRunner("Neda", "Bazdar", 343, 3), - new BanffMarathonRunner("Aaron", "Smith", 317, 6), - this.kate - }; - - public BanffMarathonRunnerTest(String testName) { - super(testName); - } - - public static Test suite() { - return new TestSuite(BanffMarathonRunnerTest.class); - } - - public void testGetFastestRunner() { - assertEquals(this.john, BanffMarathonRunner.getFastestRunner(this.runners)); - } - - public void testGetSecondFastestRunner() { - assertEquals(this.kate, BanffMarathonRunner.getSecondFastestRunner(this.runners)); - } - - public void testGetAverageTime() { - assertEquals(321, BanffMarathonRunner.getAverageTime(this.runners)); - } - - public void testGetAboveAverageRunners() { - String expected = - String.join( - System.lineSeparator(), - "Elena 1", - "Suzie 7", - "Philip 9", - "James 1", - "Jane 1", - "Emily 4", - "Neda 3"); - assertEquals(expected, BanffMarathonRunner.getAboveAverageRunners(this.runners)); - } -} |
