Beispiel #1
0
        public void Equals()
        {
            Margins m = new Margins();

            Assert.IsTrue(m.Equals(m), "Equals(m)");
            Assert.IsFalse(m.Equals(null), "Equals(null)");
        }
Beispiel #2
0
 public void Equals_InvokeObject_ReturnsExpected(Margins margins, object obj, bool expected)
 {
     Assert.Equal(expected, margins.Equals(obj));
     if (obj is Margins)
     {
         Assert.Equal(expected, margins.GetHashCode().Equals(obj.GetHashCode()));
     }
 }
 public bool Equals(TestUITexture other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(Name, other.Name) && Width == other.Width && Height == other.Height && CornerArea.Equals(other.CornerArea) && Margins.Equals(other.Margins));
 }
Beispiel #4
0
 public void Equals_Margin_Success(Margins margin1, Margins margin2, bool expectedResult)
 {
     Assert.Equal(expectedResult, margin1.Equals(margin2));
     Assert.Equal(expectedResult, margin1 == margin2);
     Assert.NotEqual(expectedResult, margin1 != margin2);
 }