示例#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));
 }