示例#1
0
        public void Inserted_Same_Object_Is_Equal()
        {
            //---------------Set up test pack-------------------
            var listTo = new SharepointReadListTo {
                FieldName = "A", Type = "a"
            };
            var listTo1 = new SharepointReadListTo {
                FieldName = "A", Type = "a"
            };

            //---------------Assert Precondition----------------
            Assert.IsTrue(listTo.Equals(listTo1));
            //---------------Execute Test ----------------------
            listTo.Inserted  = true;
            listTo1.Inserted = true;
            var @equals = listTo.Equals(listTo1);

            //---------------Test Result -----------------------
            Assert.IsTrue(equals);
        }
示例#2
0
        public void IsRequired_Different_Object_Is_Not_Equal()
        {
            //---------------Set up test pack-------------------
            var listTo = new SharepointReadListTo {
                FieldName = "A", Type = "A"
            };
            var listTo1 = new SharepointReadListTo {
                FieldName = "A", Type = "A"
            };

            //---------------Assert Precondition----------------
            Assert.IsTrue(listTo.Equals(listTo1));
            //---------------Execute Test ----------------------
            listTo.IsRequired  = true;
            listTo1.IsRequired = false;
            var @equals = listTo.Equals(listTo1);

            //---------------Test Result -----------------------
            Assert.IsFalse(equals);
        }
示例#3
0
        public void Equals_EmptyTos_IsEqual()
        {
            //---------------Set up test pack-------------------
            var listTo  = new SharepointReadListTo();
            var listTo1 = new SharepointReadListTo();

            //---------------Assert Precondition----------------
            Assert.IsNotNull(listTo);
            //---------------Execute Test ----------------------
            var @equals = listTo.Equals(listTo1);

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
示例#4
0
        public void Equals_DiffentFieldNames_Object_Is_Not_IsEqua()
        {
            //---------------Set up test pack-------------------
            var listTo = new SharepointReadListTo {
                FieldName = "a"
            };
            var listTo1 = new SharepointReadListTo {
                FieldName = "A"
            };

            //---------------Assert Precondition----------------
            Assert.IsNotNull(listTo);
            //---------------Execute Test ----------------------
            var @equals = listTo.Equals(listTo1);

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
示例#5
0
        public void Equals_DiffentInternalName_Object_Is_Not_IsEqual_CaseSensitive()
        {
            //---------------Set up test pack-------------------
            var listTo = new SharepointReadListTo {
                FieldName = "A", InternalName = "sss"
            };
            var listTo1 = new SharepointReadListTo {
                FieldName = "A", InternalName = "dfdf"
            };

            //---------------Assert Precondition----------------
            Assert.IsNotNull(listTo);
            //---------------Execute Test ----------------------
            var @equals = listTo.Equals(listTo1);

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
示例#6
0
        public void Equals_VariableName__Object_Is_IsEqual()
        {
            //---------------Set up test pack-------------------
            var listTo = new SharepointReadListTo()
            {
                FieldName = "a", VariableName = "A"
            };
            var listTo1 = new SharepointReadListTo()
            {
                FieldName = "a", VariableName = "A"
            };;

            //---------------Assert Precondition----------------
            Assert.IsNotNull(listTo);
            //---------------Execute Test ----------------------
            var @equals = listTo.Equals(listTo1);

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }