Ejemplo n.º 1
0
        public void ItShouldDelete()
        {
            //arrange
            var expectedCount = 0;
            var review        = new Review {
                Rating = 500
            };

            //act
            context.Reviews.Add(review);
            _sut.Delete(review);

            //assert
            Assert.AreEqual(expectedCount, context.Reviews.Where(x => x.Rating == 500).ToList().Count());
        }
        public void ItShouldDelete()
        {
            //arrange
            var expectedCount = 0;
            var client        = new Client {
                Name = "Pop"
            };

            //act
            context.Clients.Add(client);
            _sut.Delete(client);

            //assert
            Assert.AreEqual(expectedCount, context.Clients.Where(x => x.Name == "Pop").ToList().Count());
        }
        public void ItShouldDelete()
        {
            //arrange
            var expectedCount = 0;
            var author        = new Author {
                Name = "Pop"
            };

            //act
            context.Authors.Add(author);
            _sut.Delete(author);

            //assert
            Assert.AreEqual(expectedCount, context.Authors.Where(x => x.Name == "Pop").ToList().Count());
        }
        public void ItShouldDelete()
        {
            //arrange
            var expectedCount = 0;
            var book          = new Book {
                Title = "1984"
            };

            //act
            context.Books.Add(book);
            _sut.Delete(book);

            //assert
            Assert.AreEqual(expectedCount, context.Books.Where(x => x.Title == "1984").ToList().Count());
        }
Ejemplo n.º 5
0
        public void ItShouldDelete()
        {
            //arrange
            var expectedCount = 0;
            var publisher     = new Publisher {
                Name = "Pop"
            };

            //act
            context.Publishers.Add(publisher);
            _sut.Delete(publisher);

            //assert
            Assert.AreEqual(expectedCount, context.Publishers.Where(x => x.Code == "00BV").ToList().Count());
        }
            public void ItShouldDelete()
            {
                //arrange
                var expectedCount = 0;
                var adress        = new Address {
                    City = "Iasi"
                };

                //act
                context.Addresses.Add(adress);
                _sut.Delete(adress);

                //assert
                Assert.AreEqual(expectedCount, context.Addresses.Where(x => x.City == "Iasi").ToList().Count());
            }
        public void ItShouldDelete()
        {
            //arrange
            var expectedCount = 0;
            var loan          = new Loan {
                Tax = 100
            };

            //act
            context.Loans.Add(loan);
            _sut.Delete(loan);

            //assert
            Assert.AreEqual(expectedCount, context.Loans.Where(x => x.Tax == 100).ToList().Count());
        }