예제 #1
0
        public void Equals_Given_Different_MergeCollection_Is_Not_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId  = Guid.NewGuid().ToString();
            var mergeColl = new List <DataMergeDTO>
            {
                new DataMergeDTO
                {
                    InputVariable = "[[VariableA]]"
                    ,
                    At = "'"
                    ,
                    MergeType = "CHAR"
                    ,
                    Alignment = "RIGHT"
                }
            };
            var mergeColl2 = new List <DataMergeDTO>()
            {
                new DataMergeDTO
                {
                    InputVariable = "[[VariableA]]"
                    ,
                    At = "'"
                    ,
                    MergeType = "CHAR"
                    ,
                    Alignment = "LEFT"
                }
            };
            var activity1 = new DsfDataMergeActivity()
            {
                UniqueID = uniqueId, MergeCollection = mergeColl
            };
            var activity = new DsfDataMergeActivity()
            {
                UniqueID = uniqueId, MergeCollection = mergeColl2
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
예제 #2
0
        public void Equals_Given_Different_DisplayName_Is_Not_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId  = Guid.NewGuid().ToString();
            var activity1 = new DsfDataMergeActivity()
            {
                UniqueID = uniqueId, DisplayName = "A"
            };
            var activity = new DsfDataMergeActivity()
            {
                UniqueID = uniqueId, DisplayName = "ass"
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
예제 #3
0
        public void Equals_Given_EmptyActivityTools_AreEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId = Guid.NewGuid().ToString();
            var activity = new DsfDataMergeActivity()
            {
                UniqueID = uniqueId
            };
            var activity1 = new DsfDataMergeActivity()
            {
                UniqueID = uniqueId
            };

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

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
예제 #4
0
        public void Equals_Given_Same_MergeCollection_IsEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId  = Guid.NewGuid().ToString();
            var mergeColl = new List <DataMergeDTO>();
            var activity1 = new DsfDataMergeActivity()
            {
                UniqueID = uniqueId, MergeCollection = mergeColl
            };
            var activity = new DsfDataMergeActivity()
            {
                UniqueID = uniqueId, MergeCollection = mergeColl
            };

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

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