Example #1
0
        public void CreateFerryTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Ferry item = UnitTest.TestHelpers.randomFerry();
            item.FerryId = 0;
            item         = abe.CreateFerry(item);
            Assert.AreNotEqual(0, item.FerryId);
        }
Example #2
0
        public void GetFerryTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Ferry newItem = UnitTest.TestHelpers.randomFerry();
            newItem = abe.CreateFerry(newItem);
            Contract.dto.Ferry item = abe.GetFerry(newItem.FerryId);
            Assert.AreEqual(newItem.FerryId, item.FerryId);
        }
Example #3
0
        public void DeleteFerryTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Ferry item = UnitTest.TestHelpers.randomFerry();
            item.FerryId = 0;
            item         = abe.CreateFerry(item);
            Assert.IsTrue(abe.DeleteFerry(item));
        }
Example #4
0
        public void UpdateFerryTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Ferry item = UnitTest.TestHelpers.randomFerry();
            item.FerryId   = 0;
            item           = abe.CreateFerry(item);
            item.FerryName = "ANDERS AND";
            item           = abe.UpdateFerry(item);

            Assert.AreEqual("ANDERS AND", item.FerryName);
        }