Beispiel #1
0
		public void ObjectEquals_OneStarredOtherIsNot_False()
		{
			var form1 = new LanguageForm();
			var form2 = new LanguageForm();
			form1.IsStarred = true;
			Assert.That(form1.Equals((object)form2), Is.False);
		}
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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;
 }
Beispiel #7
0
		public void ObjectEquals_SameObject_True()
		{
			var form = new LanguageForm();
			Assert.That(form.Equals((object) form), Is.True);
		}