public void ObjectEquals_OneStarredOtherIsNot_False() { var form1 = new LanguageForm(); var form2 = new LanguageForm(); form1.IsStarred = true; Assert.That(form1.Equals((object)form2), Is.False); }
public void ObjectEquals_Null_False() { var form1 = new LanguageForm { IsStarred = true, WritingSystemId = "en", Form = "form1" }; LanguageForm form2 = null; Assert.That(form1.Equals((object)form2), Is.False); }
public void ObjectEquals_StarredWritingSystemAndFormAreIdentical_True() { var form1 = new LanguageForm { IsStarred = true, WritingSystemId = "en", Form = "form1" }; var form2 = new LanguageForm { IsStarred = true, WritingSystemId = "en", Form = "form1" }; Assert.That(form1.Equals((object)form2), Is.True); }
public void ObjectEquals_OneContainsFormInWritingSystemOtherDoesNot_False() { var form1 = new LanguageForm { WritingSystemId = "en", Form = "form1" }; var form2 = new LanguageForm { WritingSystemId = "en", Form = "form2" }; Assert.That(form1.Equals((object)form2), Is.False); }
public void Equals_OneContainsWritingSystemOtherDoesNot_False() { var form1 = new LanguageForm { WritingSystemId = "en" }; var form2 = new LanguageForm { WritingSystemId = "de" }; Assert.That(form1.Equals(form2), Is.False); }
public bool ContainsEqualForm(LanguageForm other) { foreach (LanguageForm form in Forms) { if (other.Equals(form)) { return true; } } return false; }
public void ObjectEquals_SameObject_True() { var form = new LanguageForm(); Assert.That(form.Equals((object) form), Is.True); }