Exemple #1
0
        public void EqualsUShortFalse()
        {
            ushort x        = 3;
            ushort y        = 4;
            var    comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #2
0
        public void EqualsStringFalse()
        {
            string x        = "Right String";
            string y        = "Wrong String";
            var    comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #3
0
        public void EqualsULongFalse()
        {
            ulong x        = 3;
            ulong y        = 4;
            var   comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #4
0
        public void EqualsShortTrue()
        {
            short x        = 3;
            short y        = 3;
            var   comparer = new GenericDeepEqualityComparer();

            Assert.True(comparer.Equals(x, y));
        }
Exemple #5
0
        public void EqualsLongTrue()
        {
            long x        = 3;
            long y        = 3;
            var  comparer = new GenericDeepEqualityComparer();

            Assert.True(comparer.Equals(x, y));
        }
Exemple #6
0
        public void EqualsUIntTrue()
        {
            uint x        = 3;
            uint y        = 3;
            var  comparer = new GenericDeepEqualityComparer();

            Assert.True(comparer.Equals(x, y));
        }
Exemple #7
0
        public void EqualsIntFalse()
        {
            int x        = 3;
            int y        = 4;
            var comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #8
0
        public void EqualsFloatFalse()
        {
            float x        = 3.2f;
            float y        = 4.7f;
            var   comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #9
0
        public void EqualsByteTrue()
        {
            byte x        = 3;
            byte y        = 3;
            var  comparer = new GenericDeepEqualityComparer();

            Assert.True(comparer.Equals(x, y));
        }
Exemple #10
0
        public void EqualsDecimalFalse()
        {
            decimal x        = 3.4m;
            decimal y        = 4.9m;
            var     comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #11
0
        public void EqualsBoolTrue()
        {
            bool x        = true;
            bool y        = true;
            var  comparer = new GenericDeepEqualityComparer();

            Assert.True(comparer.Equals(x, y));
        }
Exemple #12
0
        public void EqualsDoubleFalse()
        {
            double x        = 3.2;
            double y        = 4.7;
            var    comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #13
0
        public void EqualsSByteFalse()
        {
            sbyte x        = 3;
            sbyte y        = 4;
            var   comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #14
0
        public void EqualsCharFalse()
        {
            char x        = 'a';
            char y        = 'A';
            var  comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #15
0
        public void EqualsGuidFalse()
        {
            Guid x        = Guid.NewGuid();
            Guid y        = Guid.NewGuid();
            var  comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #16
0
        public void EqualsGuidTrue()
        {
            Guid x        = Guid.NewGuid();
            Guid y        = new Guid(x.ToByteArray());
            var  comparer = new GenericDeepEqualityComparer();

            Assert.True(comparer.Equals(x, y));
        }
Exemple #17
0
        public void EqualsDataTimeFalse()
        {
            DateTime x        = DateTime.Parse("12/7/2019");
            DateTime y        = DateTime.Parse("12/7/2029");
            var      comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #18
0
        public void EqualsClassFalse()
        {
            TestClass x = new TestClass {
                iNumber = 3, sWord = "Class Test"
            };
            TestClass y = new TestClass {
                iNumber = 3, sWord = "Wrong Class Test"
            };
            var comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }
Exemple #19
0
        public void EqualsStructFalse()
        {
            TestStruct x = new TestStruct {
                iNumber = 3, sWord = "Struct Test"
            };
            TestStruct y = new TestStruct {
                iNumber = 3, sWord = "Wrong Struct Test"
            };
            var comparer = new GenericDeepEqualityComparer();

            Assert.False(comparer.Equals(x, y));
        }