Added tests, and sails to all clients.

#story[1111]
This commit is contained in:
Kusal Ekanayake
2017-08-06 15:43:22 +12:00
parent ae28ccf228
commit ecf2c52cfa
4 changed files with 64 additions and 25 deletions
@@ -0,0 +1,35 @@
package seng302.visualiser.map;
import static junit.framework.TestCase.assertFalse;
import static junit.framework.TestCase.assertTrue;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import seng302.model.Yacht;
import seng302.visualiser.fxObjects.BoatObject;
/**
* Created by kre39 on 6/08/17.
*/
public class BoatSailAnimationToggleTest {
private Yacht yacht;
@Before
public void setup() throws Exception{
yacht = new Yacht("Yacht", 1, "YACHT", "YAC", "Test Yacht", "NZ");
}
@Test
public void sailToggleTest() throws Exception {
assertFalse(yacht.getClientSailsIn());
assertFalse(yacht.getSailIn());
yacht.toggleClientSail();
assertTrue(yacht.getClientSailsIn());
assertFalse(yacht.getSailIn());
}
}