Created boat class & tests

This commit is contained in:
Michael Rausch
2017-03-03 16:22:31 +13:00
parent 7ef64ad7a0
commit 527afdb4a9
3 changed files with 60 additions and 2 deletions
+26
View File
@@ -0,0 +1,26 @@
package seng302;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
/**
* Unit test for the Team class.
*/
public class BoatTest
{
@Test
public void testBoatCreation()
{
Boat boat1 = new Boat("Team 1");
assertEquals(boat1.getTeamName(), "Team 1");
}
@Test
public void testChangeTeamName()
{
Boat boat1 = new Boat("Team 1");
boat1.setTeamName("Team 2");
assertEquals(boat1.getTeamName(), "Team 2");
}
}