Exemplo n.º 1
0
        public void VerifyFluentDidMagic()
        {
            var samich1 = new FoodCollection
            {
                Foods = new List <FoodInfo>
                {
                    new FoodInfo {
                        Name = "Lettuce"
                    }, new FoodInfo {
                        Name = "Bacon"
                    }, new FoodInfo {
                        Name = "Tomato"
                    }
                }
            };
            var samich2 = new FoodCollection
            {
                Foods = new List <FoodInfo>
                {
                    new FoodInfo {
                        Name = "Lettuce"
                    }, new FoodInfo {
                        Name = "Bakon"
                    }, new FoodInfo {
                        Name = "Tomato"
                    }
                }
            };

            /* Fluent doesn't give us a way to show the negation here */
//            samich1.Should().BeEquivalentTo(samich2);
        }
Exemplo n.º 2
0
        public void FluentlyCompare()
        {
            var samich1 = new FoodCollection
            {
                Foods = new List <FoodInfo>
                {
                    new FoodInfo {
                        Name = "Lettuce"
                    }, new FoodInfo {
                        Name = "Bacon"
                    }, new FoodInfo {
                        Name = "Tomato"
                    }
                }
            };
            var samich2 = new FoodCollection
            {
                Foods = new List <FoodInfo>
                {
                    new FoodInfo {
                        Name = "Lettuce"
                    }, new FoodInfo {
                        Name = "Bacon"
                    }, new FoodInfo {
                        Name = "Tomato"
                    }
                }
            };

            samich1.Should().BeEquivalentTo(samich2);
        }