Ejemplo n.º 1
0
        public void Test_When_Save_With_Invalid_Date_Throw_Exception()
        {
            var service = new PackageService(new UnitOfWork());

            var package = new Package()
            {
                Title = "testers",
                Description = "test12",
                Location = "stafford",
                ModifiedDate = DateTime.Now.AddDays(-5)
            };
            service.InsertPackage(package);
        }
Ejemplo n.º 2
0
        public void Test_When_Save_with_Valid_Expiration_Save()
        {
            var service = new PackageService(new UnitOfWork());
            var package = new Package()
            {
                Title = "test",
                Description = "test12",
                Location = "stafford",
                ModifiedDate = DateTime.Now.AddDays(10)
            };

            service.InsertPackage(package);
            Assert.IsNotNull(service.FindByTitle("test"));
        }