public void TestShotDefaultConstructor() { Shot shot = new Shot(); Square square = new Square(); Assert.IsTrue(shot.getTarget().getXLoc() == square.getXLoc()); Assert.IsTrue(shot.getTarget().getYLoc() == square.getYLoc()); Assert.IsTrue(shot.getTarget().getSquareState() == square.getSquareState()); }
public void TestShotGettersAndSetters() { Shot shot = new Shot(); Square square = new Square(); shot.setTarget(square); Assert.IsTrue(shot.getTarget().getXLoc() == square.getXLoc()); Assert.IsTrue(shot.getTarget().getYLoc() == square.getYLoc()); Assert.IsTrue(shot.getTarget().getSquareState() == square.getSquareState()); }
public void TestShotNonDefaultConstructor() { Square square = new Square(); Shot shot = new Shot(square); Assert.IsTrue(shot.getTarget() == square); }