Exemplo n.º 1
0
        public void Test6_ReturnPiratesOnShip()
        {
            Pirate testPirate = new Pirate("ayaya", "cap");

            testPirate.Save();

            Ship testShip1 = new Ship("black", "long");

            testShip1.Save();

            Ship testShip2 = new Ship("white", "short");

            testShip2.Save();

            testPirate.AddShip(testShip1);
            List <Ship> result   = testPirate.GetShips();
            List <Ship> testList = new List <Ship> {
                testShip1
            };

            Assert.Equal(testList, result);
        }
Exemplo n.º 2
0
        public void Test1_DataBaseEmpty_True()
        {
            int table = Pirate.GetAll().Count;

            Assert.Equal(0, table);
        }
Exemplo n.º 3
0
 public void Dispose()
 {
     Pirate.DeleteAll();
     Ship.DeleteAll();
 }