Пример #1
0
        public void Should_FailEqualityForDifferetObjectTypes()
        {
            var stringItem = new StringItem("lena", 4);
            var obj        = "test";

            Assert.IsFalse(stringItem.Equals(obj));
        }
Пример #2
0
        public void Should_FailEqualityForDifferentDataTypes()
        {
            var stringItem  = new StringItem("lena", 4);
            var numericItem = new F4(5);

            Assert.IsFalse(stringItem.Equals(numericItem));
        }
Пример #3
0
        public void Should_BeEqualIfStringItemsEqual()
        {
            var stringItem  = new StringItem("lena", 4);
            var stringItem2 = new StringItem("lena", 4);

            Assert.IsTrue(stringItem.Equals(stringItem2));
        }
Пример #4
0
        public void Should_FailEqualityForDifferentStringLength()
        {
            var stringItem  = new StringItem("lena", 5);
            var stringItem2 = new StringItem("lena", 2);

            Assert.IsFalse(stringItem.Equals(stringItem2));
        }
Пример #5
0
        public void Should_FailEqualityForDifferentStringValues()
        {
            var stringItem  = new StringItem("lena", 4);
            var stringItem2 = new StringItem("test", 4);

            Assert.IsFalse(stringItem.Equals(stringItem2));
        }
Пример #6
0
        public void Should_FailEqualityForNull()
        {
            var stringItem = new StringItem("lena", 4);

            Assert.IsFalse(stringItem.Equals(null));
        }
Пример #7
0
 public bool Equals(TestSubConfiguration other) =>
 StringItem.Equals(other.StringItem) &&
 NumberItem.Equals(other.NumberItem);