Пример #1
0
        public void GetAllLimousines_ShouldWork()
        {
            VipServicesContextTest contextTest = new VipServicesContextTest(keepExistingDB: false);
            VipServicesManager     m           = new VipServicesManager(new UnitOfWork(contextTest));

            m.AddLimousine("Chrysler", "300C Limousine", "White", 175, 800, 500, 1000);
            m.AddLimousine("Lincoln", "Limousine", "Pink", 180, 900, 500, 1000);
            m.AddLimousine("Tesla", "Model S", "White", 500, 0, 2000, 2200);

            Action act = () =>
            {
                m.GetAllLimousines();
            };

            act.Should().NotThrow <DomainException>();
            Assert.AreEqual(3, contextTest.Limousines.Local.Count);
            Assert.AreEqual(3, m.GetAllLimousines().Count);
        }