Last active
November 30, 2020 22:09
-
-
Save smith558/f366bd037b2dc469edee70db9ba36968 to your computer and use it in GitHub Desktop.
An erroneous test case in TestPart2.java?
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
/** | |
* Test {@link SEStudent#groupWork(Character)}. | |
*/ | |
@Test | |
@DisplayName("Test SEStudent's groupWork(Character)") | |
public void testSEStudent_groupWork() { | |
student.selfStudy(); | |
student.selfStudy(); | |
student.selfStudy(); | |
student.selfStudy(); | |
student.selfStudy(); | |
assertEquals(18, student.getHP(), "Incorrect HP for SEStudent before using group work"); | |
assertEquals(11, student.getAttack(), "Incorrect Attack for SEStudent before using group work"); | |
assertEquals(18, student.getEP(), "Incorrect EP for SEStudent before using group work"); | |
try { | |
student.groupWork(enemy2); | |
assertEquals(22, student.getEP(), "Incorrect EP for Student after using group work"); | |
assertEquals(2, enemy2.getHP(), "Incorrect HP for Enemy2 after group work attack by Student"); | |
} catch (Exception e) { | |
fail(" Students should have sufficient KPs"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment