Example #1
0
        public void BaseModalComparer_Equals_RightNull()
        {
            var bmComparer = new BaseModelComparer <BaseModel>();
            var bModel     = new BaseModel();

            var result = bmComparer.Equals(bModel, null);

            Assert.IsFalse(result);
        }
Example #2
0
        public void BaseModalComparer_Equals_SameObject()
        {
            var bmComparer = new BaseModelComparer <BaseModel>();
            var bModel     = new BaseModel();

            var result = bmComparer.Equals(bModel, bModel);

            Assert.IsTrue(result);
        }
Example #3
0
        public void BaseModalComparer_Equals_RightNullId()
        {
            var bmComparer = new BaseModelComparer <BaseModel>();
            var bModel1    = new BaseModel {
                Id = 666
            };
            var bModel2 = new BaseModel();

            var result = bmComparer.Equals(bModel1, bModel2);

            Assert.IsFalse(result);
        }
Example #4
0
        public void BaseModalComparer_Equals_SameId()
        {
            var bmComparer = new BaseModelComparer <BaseModel>();
            var bModel1    = new BaseModel {
                Id = 666
            };
            var bModel2 = new BaseModel {
                Id = 666
            };

            var result = bmComparer.Equals(bModel1, bModel2);

            Assert.IsTrue(result);
        }