Пример #1
0
 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());
 }
Пример #2
0
 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());
 }
Пример #3
0
 public void TestShotNonDefaultConstructor()
 {
     Square square = new Square();
     Shot shot = new Shot(square);
     Assert.IsTrue(shot.getTarget() == square);
 }