Exemple #1
0
        public void Equals_Given_Empty_ActivityDto_AreEqual()
        {
            //---------------Set up test pack-------------------
            var activity  = new ActivityDTO();
            var activity1 = new ActivityDTO();

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

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
        public void Equals_DiffentindexNumber_Is_NotIsEqual()
        {
            //---------------Set up test pack-------------------
            var multiAssign  = new ActivityDTO("A", "A", 1);
            var multiAssign1 = new ActivityDTO("A", "A", 2);

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

            //---------------Test Result -----------------------
            Assert.IsFalse(equals);
        }
        public void Equals_FieldNames_Is_IsEqual()
        {
            //---------------Set up test pack-------------------
            var multiAssign  = new ActivityDTO("A", "A", 1);
            var multiAssign1 = new ActivityDTO("A", "A", 1);

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

            //---------------Test Result -----------------------
            Assert.IsTrue(equals);
        }
Exemple #4
0
        public void Equals_Given_DisfferentInserted_ActivityDto_AreNotEqual()
        {
            //---------------Set up test pack-------------------
            var activity = new ActivityDTO {
                Inserted = false
            };
            var activity1 = new ActivityDTO {
                Inserted = true
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Exemple #5
0
        public void Equals_Given_DifferentWatermarkTextValue_ActivityDto_AreNotEqual()
        {
            //---------------Set up test pack-------------------
            var activity = new ActivityDTO {
                WatermarkTextValue = "some text value"
            };
            var activity1 = new ActivityDTO {
                WatermarkTextValue = "some other text value"
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Exemple #6
0
        public void Equals_Given_SameWatermarkTextValue_ActivityDto_AreEqual()
        {
            //---------------Set up test pack-------------------
            var activity = new ActivityDTO {
                WatermarkTextValue = ""
            };
            var activity1 = new ActivityDTO {
                WatermarkTextValue = ""
            };

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

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
Exemple #7
0
        public void Equals_Given_DifferentErrorMessage_ActivityDto_AreNotEqual()
        {
            //---------------Set up test pack-------------------
            var activity = new ActivityDTO {
                ErrorMessage = "some error"
            };
            var activity1 = new ActivityDTO {
                ErrorMessage = "some other error"
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Exemple #8
0
        public void Equals_Given_SameIsFieldNameFocused_ActivityDto_AreEqual()
        {
            //---------------Set up test pack-------------------
            var activity = new ActivityDTO {
                IsFieldNameFocused = false
            };
            var activity1 = new ActivityDTO {
                IsFieldNameFocused = false
            };

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

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
Exemple #9
0
        public void Equals_Given_DifferentFieldName_ActivityDto_AreNotEqual()
        {
            //---------------Set up test pack-------------------
            var activity = new ActivityDTO {
                FieldName = "Field A"
            };
            var activity1 = new ActivityDTO {
                FieldName = "Field B"
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Exemple #10
0
        public void Equals_Given_SameOutList_ActivityDto_AreEqual()
        {
            //---------------Set up test pack-------------------
            var outlist = new List <string> {
                "some item"
            };
            var activity = new ActivityDTO {
                OutList = outlist
            };
            var activity1 = new ActivityDTO {
                OutList = outlist
            };

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

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
Exemple #11
0
        public void Equals_Given_SameOutList_DifferentIndexes_ActivityDto_AreNOTEqual()
        {
            //---------------Set up test pack-------------------
            var outlist = new List <string> {
                "some item2", "some item1"
            };
            var outlist2 = new List <string> {
                "some item1", "some item2"
            };
            var activity = new ActivityDTO {
                OutList = outlist
            };
            var activity1 = new ActivityDTO {
                OutList = outlist2
            };

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

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