コード例 #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);
		}
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #6
0
 public bool ContainsEqualForm(LanguageForm other)
 {
     foreach (LanguageForm form in Forms)
     {
         if (other.Equals(form))
         {
             return true;
         }
     }
     return false;
 }
コード例 #7
0
		public void ObjectEquals_SameObject_True()
		{
			var form = new LanguageForm();
			Assert.That(form.Equals((object) form), Is.True);
		}