Example #1
0
        public void Equals_Given_Same_SystemInformationCollection_Different_Indexes_IsNotEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId = Guid.NewGuid().ToString();
            var systemInformationCollection = new List <GatherSystemInformationTO>
            {
                new GatherSystemInformationTO
                {
                    EnTypeOfSystemInformation = Data.Interfaces.Enums.enTypeOfSystemInformationToGather.UserName
                }
                ,
                new GatherSystemInformationTO
                {
                    EnTypeOfSystemInformation = Data.Interfaces.Enums.enTypeOfSystemInformationToGather.ComputerName
                }
            };

            var systemInformationCollection2 = new List <GatherSystemInformationTO>
            {
                new GatherSystemInformationTO
                {
                    EnTypeOfSystemInformation = Data.Interfaces.Enums.enTypeOfSystemInformationToGather.ComputerName
                }
                ,
                new GatherSystemInformationTO
                {
                    EnTypeOfSystemInformation = Data.Interfaces.Enums.enTypeOfSystemInformationToGather.UserName
                }
            };
            var activity1 = new DsfGatherSystemInformationActivity()
            {
                UniqueID = uniqueId, SystemInformationCollection = systemInformationCollection
            };
            var activity = new DsfGatherSystemInformationActivity()
            {
                UniqueID = uniqueId, SystemInformationCollection = systemInformationCollection2
            };

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

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

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

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

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

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
Example #4
0
        public void Equals_Given_Same_Text_IsEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId = Guid.NewGuid().ToString();
            var systemInformationCollection = new List <GatherSystemInformationTO>();
            var activity1 = new DsfGatherSystemInformationActivity()
            {
                UniqueID = uniqueId, SystemInformationCollection = systemInformationCollection
            };
            var activity = new DsfGatherSystemInformationActivity()
            {
                UniqueID = uniqueId, SystemInformationCollection = systemInformationCollection
            };

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

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