Ejemplo n.º 1
0
        public void DeletingTour()
        {
            var UoW = new Mock <UnitOfWork>();

            UoW.Object.DeleteDB();

            var TourLogic = new TourLogic(UoW.Object);
            var UserLogic = new UserLogic(UoW.Object);

            UserLogic.AddUser(new Logic.DTOs.UserDTO("Sasha", Logic.DTOs.UserType.Manager, "Veklych", "Login", "Password"));
            UserLogic.Login("Login", "Password");

            TourLogic.AddTour(new Logic.DTOs.TourDTO("Karpaty", 250, "Excursion", "Ukraine", "Hust", 3, "Very nice mountains tour"));

            var Tour = TourLogic.GetAllToursTemplates().ToList()[0];

            Assert.That(TourLogic.GetAllToursTemplates().Count() == 1);

            TourLogic.DeleteTour(1);

            Assert.That(TourLogic.GetAllToursTemplates().Count() == 0);
        }
Ejemplo n.º 2
0
        public void DeletingTour()
        {
            var UoW = new Mock <UnitOfWork>();

            UoW.Object.DeleteDB();

            var TourLogic = new TourLogic(UoW.Object);
            var UserLogic = new UserLogic(UoW.Object);

            UserLogic.AddUser(new BLL.DTOs.UserDTO("Liza", BLL.DTOs.UserType.Manager, "Bril", "Login", "Password"));
            UserLogic.Login("Login", "Password");

            TourLogic.AddTour(new BLL.DTOs.TourDTO("Krakow tour", 250, "Excursion", "Poland", "Krakow", 3, "The best tour to Krakow"));

            var Tour = TourLogic.GetAllToursTemplates().ToList()[0];

            Assert.That(TourLogic.GetAllToursTemplates().Count() == 1);

            TourLogic.DeleteTour(1);

            Assert.That(TourLogic.GetAllToursTemplates().Count() == 0);
        }
Ejemplo n.º 3
0
        public void DeletingTour()
        {
            var UoW = new Mock <UnitOfWork>();

            UoW.Object.DeleteDB();

            var TourLogic = new TourLogic(UoW.Object);
            var UserLogic = new UserLogic(UoW.Object);

            UserLogic.AddUser(new Logic.DTOs.UserDTO("Dimon", Logic.DTOs.UserType.Manager, "Cherneckii", "Login", "Password"));
            UserLogic.Login("Login", "Password");

            TourLogic.AddTour(new Logic.DTOs.TourDTO("ODessa", 250, "Excursion", "Ukraine", "Zaporogie", 3, "Go at beach"));

            var Tour = TourLogic.GetAllToursTemplates().ToList()[0];

            Assert.That(TourLogic.GetAllToursTemplates().Count() == 1);

            TourLogic.DeleteTour(1);

            Assert.That(TourLogic.GetAllToursTemplates().Count() == 0);
        }