예제 #1
0
        public override bool Equals(object o)
        {
            if (!(o is JobHistory))
            {
                return(false);
            }
            JobHistory v = o as JobHistory;

            if (!Capacity.Equals(v.Capacity))
            {
                return(false);
            }
            if (!Column.Equals(v.Column))
            {
                return(false);
            }
            if (!Enabled.Equals(v.Enabled))
            {
                return(false);
            }
            if (!LastDateFrom.Equals(v.LastDateFrom))
            {
                return(false);
            }
            if (!LastDateTo.Equals(v.LastDateTo))
            {
                return(false);
            }
            if (!LastSearchText.Equals(v.LastSearchText))
            {
                return(false);
            }
            return(true);
        }
예제 #2
0
        /// <summary>
        /// Returns true if Zone instances are equal
        /// </summary>
        /// <param name="other">Instance of Zone to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Zone other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     Metadata == other.Metadata ||
                     Metadata != null &&
                     Metadata.Equals(other.Metadata)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     Capacity == other.Capacity ||
                     Capacity != null &&
                     Capacity.Equals(other.Capacity)
                 ) &&
                 (
                     Peoplecount == other.Peoplecount ||
                     Peoplecount != null &&
                     Peoplecount.Equals(other.Peoplecount)
                 ) &&
                 (
                     BoundingPolygon == other.BoundingPolygon ||
                     BoundingPolygon != null &&
                     BoundingPolygon.SequenceEqual(other.BoundingPolygon)
                 ));
        }
예제 #3
0
        public override bool Equals(object o)
        {
            if (!(o is JobHistory))
            {
                return(false);
            }
            JobHistory v = o as JobHistory;

            if (!Capacity.Equals(v.Capacity))
            {
                return(false);
            }
            if (!Enabled.Equals(v.Enabled))
            {
                return(false);
            }

            return(true);
        }
예제 #4
0
 public void SutEqualsOtherSutWhenBothReservationsAndRemainingAreEqual([Frozen]int remaining, [Frozen]Guid[] ids, Capacity sut, Capacity other)
 {
     Assert.True(sut.Equals(other));
 }
예제 #5
0
 public void SutDoesNotEqualOtherSutWhenRemainingDiffers(Capacity sut, Capacity other)
 {
     Assert.NotEqual(sut.Remaining, other.Remaining);
     Assert.False(sut.Equals(other));
 }
예제 #6
0
 public void SutDoesNotEqualOtherSutWhenDifferentReservationsHaveBeenMade([Frozen]int remaining, Capacity sut, Capacity other)
 {
     Assert.False(sut.Equals(other));
 }
예제 #7
0
 public void SutDoesNotEqualNullSut(Capacity sut)
 {
     Assert.False(sut.Equals((Capacity)null));
 }
예제 #8
0
 public void SutDoesNotEqualNullObject(Capacity sut)
 {
     Assert.False(sut.Equals((object)null));
 }
예제 #9
0
 public void SutDoesNotEqualArbitraryOtherObject(Capacity sut, object other)
 {
     Assert.False(sut.Equals(other));
 }
예제 #10
0
 public void SutDoesNotEqualAnonymousOther(Capacity sut, object other)
 {
     Assert.False(sut.Equals(other));
 }
예제 #11
0
 public void SutEqualsOtherSutWhenBothReservationsAndRemainingAreEqual([Frozen] int remaining, [Frozen] Guid[] ids, Capacity sut, Capacity other)
 {
     Assert.True(sut.Equals(other));
 }
예제 #12
0
 public void SutDoesNotEqualOtherSutWhenDifferentReservationsHaveBeenMade([Frozen] int remaining, Capacity sut, Capacity other)
 {
     Assert.False(sut.Equals(other));
 }
예제 #13
0
 public void SutDoesNotEqualOtherSutWhenRemainingDiffers(Capacity sut, Capacity other)
 {
     Assert.NotEqual(sut.Remaining, other.Remaining);
     Assert.False(sut.Equals(other));
 }
예제 #14
0
 public void SutDoesNotEqualArbitraryOtherObject(Capacity sut, object other)
 {
     Assert.False(sut.Equals(other));
 }
예제 #15
0
 public void SutDoesNotEqualNullSut(Capacity sut)
 {
     Assert.False(sut.Equals((Capacity)null));
 }
예제 #16
0
 public void SutDoesNotEqualNullObject(Capacity sut)
 {
     Assert.False(sut.Equals((object)null));
 }