66 lines
1.9 KiB
Java
66 lines
1.9 KiB
Java
|
package state_pattern_tests.states;
|
||
|
|
||
|
import org.junit.Test;
|
||
|
import static org.junit.Assert.*;
|
||
|
import seabedexplorer.submersible.ROV;
|
||
|
import seabedexplorer.submersible.equipment.locationtracking.Location;
|
||
|
import seabedexplorer.submersible.state.states.BusyMoveState;
|
||
|
import seabedexplorer.util.movement.MovementEmulation;
|
||
|
|
||
|
|
||
|
public class BusyMoveStateTest {
|
||
|
|
||
|
public BusyMoveStateTest() {
|
||
|
}
|
||
|
|
||
|
@Test
|
||
|
public void BusyMoveStateTestCanMove()
|
||
|
{
|
||
|
BusyMoveState is = new BusyMoveState(new MovementEmulation(new ROV(), new Location(5, 5, 5)));
|
||
|
assertFalse(is.canMove());
|
||
|
}
|
||
|
|
||
|
@Test
|
||
|
public void BusyMoveStateTestMove()
|
||
|
{
|
||
|
BusyMoveState is = new BusyMoveState(new MovementEmulation(new ROV(), new Location(5, 5, 5)));
|
||
|
assertFalse(is.move(new Location(5, 5, 5)));
|
||
|
}
|
||
|
|
||
|
|
||
|
@Test
|
||
|
public void BusyMoveStateString()
|
||
|
{
|
||
|
BusyMoveState is = new BusyMoveState(new MovementEmulation(new ROV(), new Location(5, 5, 5)));
|
||
|
assertEquals(is.toString(), "Busy (Movement in progress)");
|
||
|
}
|
||
|
|
||
|
@Test
|
||
|
public void BusyMoveStateReturnToVesel()
|
||
|
{
|
||
|
BusyMoveState is = new BusyMoveState(new MovementEmulation(new ROV(), new Location(5, 5, 5)));
|
||
|
assertFalse(is.returnToVessel());
|
||
|
}
|
||
|
|
||
|
@Test
|
||
|
public void BusyMoveStateCollectWater()
|
||
|
{
|
||
|
BusyMoveState is = new BusyMoveState(new MovementEmulation(new ROV(), new Location(5, 5, 5)));
|
||
|
assertFalse(is.collectWater());
|
||
|
}
|
||
|
|
||
|
@Test
|
||
|
public void BusyMoveStateCollectMaterial()
|
||
|
{
|
||
|
BusyMoveState is = new BusyMoveState(new MovementEmulation(new ROV(), new Location(5, 5, 5)));
|
||
|
assertFalse(is.collectMaterial());
|
||
|
}
|
||
|
|
||
|
@Test
|
||
|
public void BusyMoveStateCollectMapping()
|
||
|
{
|
||
|
BusyMoveState is = new BusyMoveState(new MovementEmulation(new ROV(), new Location(5, 5, 5)));
|
||
|
assertFalse(is.collectMappingData());
|
||
|
}
|
||
|
}
|