public void op_Equals_object_whenEmpty()
        {
            var obj = new TestXmlSerializableCollection();

            var other = new TestXmlSerializableCollection();

            Assert.True(obj.Equals(other));
        }
        public void op_Equals_TestXmlSerializableCollectionOfT_whenSame()
        {
            var obj = new TestXmlSerializableCollection
            {
                new TestXmlSerializableCollectionItem(123),
                new TestXmlSerializableCollectionItem(456)
            };

            Assert.True(obj.Equals(obj));
        }
        public void op_Equals_TestXmlSerializableCollectionOfTNull()
        {
            var obj = new TestXmlSerializableCollection
            {
                new TestXmlSerializableCollectionItem(123),
                new TestXmlSerializableCollectionItem(456)
            };

            Assert.False(obj.Equals(null));
        }
        public void op_Equals_TestXmlSerializableCollectionOfTNull()
        {
            var obj = new TestXmlSerializableCollection
                          {
                              new TestXmlSerializableCollectionItem(123),
                              new TestXmlSerializableCollectionItem(456)
                          };

            Assert.False(obj.Equals(null));
        }
        public void op_Equals_object_whenSame()
        {
            object obj = new TestXmlSerializableCollection
            {
                new TestXmlSerializableCollectionItem(123),
                new TestXmlSerializableCollectionItem(456)
            };

            // ReSharper disable EqualExpressionComparison
            Assert.True(obj.Equals(obj));

            // ReSharper restore EqualExpressionComparison
        }
        public void op_Equals_object_whenInvalidCast()
        {
            var obj = new TestXmlSerializableCollection
            {
                new TestXmlSerializableCollectionItem(123)
            };

            const int other = 123;

            // ReSharper disable SuspiciousTypeConversion.Global
            Assert.Throws <InvalidCastException>(() => obj.Equals(other));

            // ReSharper restore SuspiciousTypeConversion.Global
        }
        public void op_Equals_TestXmlSerializableCollectionOfT_whenCountsDiffer()
        {
            var obj = new TestXmlSerializableCollection
            {
                new TestXmlSerializableCollectionItem(123)
            };

            var other = new TestXmlSerializableCollection
            {
                new TestXmlSerializableCollectionItem(123),
                new TestXmlSerializableCollectionItem(456)
            };

            Assert.False(obj.Equals(other));
        }
        public void op_Equals_objectNull()
        {
            var obj = new TestXmlSerializableCollection
            {
                new TestXmlSerializableCollectionItem(123),
                new TestXmlSerializableCollectionItem(456)
            };

            object other = null;

            // ReSharper disable ExpressionIsAlwaysNull
            Assert.False(obj.Equals(other));

            // ReSharper restore ExpressionIsAlwaysNull
        }
        public void op_Equals_TestXmlSerializableCollectionOfT_whenCountsDiffer()
        {
            var obj = new TestXmlSerializableCollection
                          {
                              new TestXmlSerializableCollectionItem(123)
                          };

            var other = new TestXmlSerializableCollection
                            {
                                new TestXmlSerializableCollectionItem(123),
                                new TestXmlSerializableCollectionItem(456)
                            };

            Assert.False(obj.Equals(other));
        }
        public void op_Equals_object(bool expected,
                                     int value)
        {
            var obj = new TestXmlSerializableCollection
            {
                new TestXmlSerializableCollectionItem(123)
            };

            object other = new TestXmlSerializableCollection
            {
                new TestXmlSerializableCollectionItem(value)
            };

            var actual = obj.Equals(other);

            Assert.Equal(expected, actual);
        }
        public void op_Equals_TestXmlSerializableCollectionOfT(bool expected,
                                                               int value)
        {
            var obj = new TestXmlSerializableCollection
                          {
                              new TestXmlSerializableCollectionItem(123)
                          };

            var other = new TestXmlSerializableCollection
                            {
                                new TestXmlSerializableCollectionItem(value)
                            };

            var actual = obj.Equals(other);

            Assert.Equal(expected, actual);
        }
        public void op_Equals_TestXmlSerializableCollectionOfT_whenSame()
        {
            var obj = new TestXmlSerializableCollection
                          {
                              new TestXmlSerializableCollectionItem(123),
                              new TestXmlSerializableCollectionItem(456)
                          };

            Assert.True(obj.Equals(obj));
        }
        public void op_Equals_object_whenSame()
        {
            object obj = new TestXmlSerializableCollection
                             {
                                 new TestXmlSerializableCollectionItem(123),
                                 new TestXmlSerializableCollectionItem(456)
                             };

            // ReSharper disable EqualExpressionComparison
            Assert.True(obj.Equals(obj));

            // ReSharper restore EqualExpressionComparison
        }
        public void op_Equals_object_whenInvalidCast()
        {
            var obj = new TestXmlSerializableCollection
                          {
                              new TestXmlSerializableCollectionItem(123)
                          };

            const int other = 123;

            // ReSharper disable SuspiciousTypeConversion.Global
            Assert.Throws<InvalidCastException>(() => obj.Equals(other));

            // ReSharper restore SuspiciousTypeConversion.Global
        }
        public void op_Equals_object_whenEmpty()
        {
            var obj = new TestXmlSerializableCollection();

            var other = new TestXmlSerializableCollection();

            Assert.True(obj.Equals(other));
        }
        public void op_Equals_objectNull()
        {
            var obj = new TestXmlSerializableCollection
                          {
                              new TestXmlSerializableCollectionItem(123),
                              new TestXmlSerializableCollectionItem(456)
                          };

            object other = null;

            // ReSharper disable ExpressionIsAlwaysNull
            Assert.False(obj.Equals(other));

            // ReSharper restore ExpressionIsAlwaysNull
        }