Exemplo n.º 1
0
        public void TestShouldCompareList1AndList1()
        {
            // Arrange

            var pp1 = SampleProductPersons.CreateProductPersons();

            // Act
            var result = pp1.Except(pp1).ToList();

            // Assert
            Assert.AreEqual(0, result.Count);
        }
Exemplo n.º 2
0
        public void TestShouldCompareList2AndList1()
        {
            // Arrange

            var pp1 = SampleProductPersons.CreateProductPersons();
            var pp2 = SampleProductPersons.CreateProductPersons2();

            // Act
            var result = pp2.Except(pp1).ToList();

            // Assert
            Assert.AreEqual(1, result.Count);
            Assert.AreEqual(Role.Producer, result.Single(p => p.PersonId == 2 && p.ProductId == 3).Role);
        }