예제 #1
0
        public void Equals_Given_Different_Activities_ActivityTools_AreNotEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId   = Guid.NewGuid().ToString();
            var activities = new System.Collections.ObjectModel.Collection <System.Activities.Activity>
            {
                new DsfDataMergeActivity
                {
                }
            };
            var activities2 = new System.Collections.ObjectModel.Collection <System.Activities.Activity>
            {
                new DsfDataSplitActivity
                {
                }
            };

            var activity = new DsfSequenceActivity()
            {
                UniqueID = uniqueId, Activities = activities
            };
            var activity1 = new DsfSequenceActivity()
            {
                UniqueID = uniqueId, Activities = activities2
            };

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

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

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

            //---------------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 DsfSequenceActivity()
            {
                UniqueID = uniqueId
            };
            var activity1 = new DsfSequenceActivity()
            {
                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_Activities_ActivityTools_AreEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId   = Guid.NewGuid().ToString();
            var activities = new System.Collections.ObjectModel.Collection <System.Activities.Activity>();
            var activity   = new DsfSequenceActivity()
            {
                UniqueID = uniqueId, Activities = activities
            };
            var activity1 = new DsfSequenceActivity()
            {
                UniqueID = uniqueId, Activities = activities
            };

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

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