public void PrivateFieldNegative() { RecipeDetail detail1 = new RecipeDetail(true, "Toffee"); detail1.Ingredient = "Crunchy Chocolate"; RecipeDetail detail2 = new RecipeDetail(true, "Crunchy Frogs"); detail2.Ingredient = "Crunchy Chocolate"; _compare.Config.ComparePrivateFields = true; Assert.IsFalse(_compare.Compare(detail1, detail2).AreEqual); _compare.Config.ComparePrivateFields = false; }
public void PrivatePropertyPositive() { RecipeDetail detail1 = new RecipeDetail(true, "Toffee"); detail1.Ingredient = "Crunchy Chocolate"; RecipeDetail detail2 = new RecipeDetail(true, "Toffee"); detail2.Ingredient = "Crunchy Chocolate"; _compare.Config.ComparePrivateProperties = true; Assert.IsTrue(_compare.Compare(detail1, detail2).AreEqual); _compare.Config.ComparePrivateProperties = false; }
public void IgnoreReadOnlyPositive() { RecipeDetail detail1 = new RecipeDetail(true, "Toffee"); detail1.Ingredient = "Crunchy Chocolate"; RecipeDetail detail2 = new RecipeDetail(false, "Toffee"); detail2.Ingredient = "Crunchy Chocolate"; _compare.Config.CompareReadOnly = false; Assert.IsTrue(_compare.Compare(detail1, detail2).AreEqual); _compare.Config.CompareReadOnly = true; }
public void IgnoreReadOnlyNegative() { RecipeDetail detail1 = new RecipeDetail(true, "Toffee"); detail1.Ingredient = "Crunchy Chocolate"; RecipeDetail detail2 = new RecipeDetail(false, "Toffee"); detail2.Ingredient = "Crunchy Chocolate"; Assert.IsFalse(_compare.Compare(detail1, detail2).AreEqual); }
public void IgnoreObjectTypesNegative() { RecipeDetail detail1 = new RecipeDetail(true, "Toffee"); detail1.Ingredient = "Crunchy Chocolate"; IndianRecipeDetail detail2 = new IndianRecipeDetail(true, "Toffee"); detail2.Ingredient = "Curry sauce"; _compare.Config.IgnoreObjectTypes = true; var result = _compare.Compare(detail1, detail2); Console.WriteLine(result.DifferencesString); Assert.IsFalse(result.AreEqual, result.DifferencesString); _compare.Config.IgnoreObjectTypes = false; }