コード例 #1
0
            public void Should_Compare_Properties_Of_Models_With_Same_Properties_And_Return_True()
            {
                var modelA  = NAuto.AutoBuild <ModelATestClass>().Construct().Build();
                var results = NAuto.CompareModelProperties(modelA, modelA);

                results.AreEqual.ShouldBeTrue();
            }
コード例 #2
0
            public void Should_Compare_Properties_Of_Models_With_Same_Properties_With_Extra_List_Item_And_Return_False()
            {
                var modelA  = NAuto.AutoBuild <ModelATestClass>().Construct().Build();
                var modelB  = NAuto.AutoBuild <ModelBTestClass>().Configure(x => x.DefaultCollectionItemCount = 3).Construct().Build();
                var results = NAuto.CompareModelProperties(modelA, modelB);

                results.AreEqual.ShouldBeFalse();
            }
コード例 #3
0
            public void Should_Compare_Properties_Of_Different_Models_With_Different_Properties_And_Return_False()
            {
                var modelA  = NAuto.AutoBuild <ModelATestClass>().Construct().Build();
                var modelB  = NAuto.AutoBuild <ModelBTestClass>().Construct().Build();
                var results = NAuto.CompareModelProperties(modelA, modelB);

                results.AreEqual.ShouldBeFalse();
            }