Ejemplo n.º 1
0
        public void GetShipTest_ValidTest()
        {
            Field field = new Field_Valid_OneShip();

            field.SetShip(Ship.CreateNewShip(
                              new Point(1),
                              Orientation.Vertical,
                              field.Ships[0].Id,
                              field.Ships[0].Size)
                          );
            ReferenceEquals(field.Ships[0], field.GetShip(new Point(1)));
        }
Ejemplo n.º 2
0
        public void GetShipTest_NullTest()
        {
            Field field = new Field_Valid_OneShip();

            field.SetShip(Ship.CreateNewShip(
                              new Point(1),
                              Orientation.Vertical,
                              field.Ships[0].Id,
                              field.Ships[0].Size)
                          );
            Assert.IsNull(field.GetShip(new Point(0)));
        }