Esempio n. 1
0
        public void WebPostActivity_ReferenceEquals_Given_Same_Object_IsNotEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId     = Guid.NewGuid().ToString();
            var settingsTrue = new List <INameValue>();

            settingsTrue.Add(new NameValue("IsFormDataChecked", "true"));
            var settingsFalse = new List <INameValue>();

            settingsFalse.Add(new NameValue("IsFormDataChecked", "false"));
            var webPostActivity = new WebPostActivityNew {
                UniqueID = uniqueId, Settings = settingsFalse
            };
            object webPostActivity1 = new WebPostActivityNew {
                UniqueID = uniqueId, Settings = settingsTrue
            };

            //---------------Assert Precondition----------------
            Assert.IsNotNull(webPostActivity);
            //---------------Execute Test ----------------------
            var equals = webPostActivity.Equals(webPostActivity1);

            //---------------Test Result -----------------------
            Assert.IsFalse(equals);
        }
Esempio n. 2
0
        public void WebPostActivity_Equals_Given_Different_OutputDescription_IsNOTEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId = Guid.NewGuid().ToString();
            var outDesc  = new OutputDescription
            {
                Format = OutputFormats.Unknown
            };
            var outDesc2 = new OutputDescription
            {
                Format = OutputFormats.ShapedXML
            };
            var webPostActivity = new WebPostActivityNew {
                UniqueID = uniqueId, OutputDescription = outDesc
            };
            var webPostActivity1 = new WebPostActivityNew {
                UniqueID = uniqueId, OutputDescription = outDesc2
            };

            //---------------Assert Precondition----------------
            Assert.IsNotNull(webPostActivity);
            //---------------Execute Test ----------------------
            var equals = webPostActivity.Equals(webPostActivity1);

            //---------------Test Result -----------------------
            Assert.IsFalse(equals);
        }
Esempio n. 3
0
        public void WebPostActivity_Equals_Given_SameWebPostTool_IsEqual()
        {
            //---------------Set up test pack-------------------
            var webPostActivity  = new WebPostActivityNew();
            var webPostActivity1 = webPostActivity;

            //---------------Assert Precondition----------------
            Assert.IsNotNull(webPostActivity);
            //---------------Execute Test ----------------------
            var equals = webPostActivity.Equals(webPostActivity1);

            //---------------Test Result -----------------------
            Assert.IsTrue(equals);
        }
Esempio n. 4
0
        public void WebPostActivity_Equals_Given_Same_DisplayName_Value_IsEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId        = Guid.NewGuid().ToString();
            var webPostActivity = new WebPostActivityNew {
                UniqueID = uniqueId, DisplayName = ""
            };
            var webPostActivity1 = new WebPostActivityNew {
                UniqueID = uniqueId, DisplayName = ""
            };

            //---------------Assert Precondition----------------
            Assert.IsNotNull(webPostActivity);
            //---------------Execute Test ----------------------
            var equals = webPostActivity.Equals(webPostActivity1);

            //---------------Test Result -----------------------
            Assert.IsTrue(equals);
        }
Esempio n. 5
0
        public void WebPostActivity_Equals_Given_Different_QueryString_IsNOTEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId        = Guid.NewGuid().ToString();
            var webPostActivity = new WebPostActivityNew {
                UniqueID = uniqueId, QueryString = "A"
            };
            var webPostActivity1 = new WebPostActivityNew {
                UniqueID = uniqueId, QueryString = "B"
            };

            //---------------Assert Precondition----------------
            Assert.IsNotNull(webPostActivity);
            //---------------Execute Test ----------------------
            var equals = webPostActivity.Equals(webPostActivity1);

            //---------------Test Result -----------------------
            Assert.IsFalse(equals);
        }
Esempio n. 6
0
        public void WebPostActivity_Equals_Given_Same_OutputDescription_IsEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId        = Guid.NewGuid().ToString();
            var outDesc         = new OutputDescription();
            var webPostActivity = new WebPostActivityNew {
                UniqueID = uniqueId, OutputDescription = outDesc
            };
            var webPostActivity1 = new WebPostActivityNew {
                UniqueID = uniqueId, OutputDescription = outDesc
            };

            //---------------Assert Precondition----------------
            Assert.IsNotNull(webPostActivity);
            //---------------Execute Test ----------------------
            var equals = webPostActivity.Equals(webPostActivity1);

            //---------------Test Result -----------------------
            Assert.IsTrue(equals);
        }
Esempio n. 7
0
        public void WebPostActivity_ReferenceEquals_Null_IsNotEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId = Guid.NewGuid().ToString();
            var settings = new List <INameValue>();

            settings.Add(new NameValue("IsFormDataChecked", "false"));
            var webPostActivity = new WebPostActivityNew {
                UniqueID = uniqueId, Settings = settings
            };

#pragma warning disable 618
            WebPostActivity webPostActivity1 = null;
#pragma warning restore 618
            //---------------Assert Precondition----------------
            Assert.IsNotNull(webPostActivity);
            //---------------Execute Test ----------------------
            var equals = webPostActivity.Equals(webPostActivity1);
            //---------------Test Result -----------------------
            Assert.IsFalse(equals);
        }
Esempio n. 8
0
        public void WebPostActivity_Equals_Given_Same_Headers_IsEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId = Guid.NewGuid().ToString();
            var headers  = new List <INameValue> {
                new NameValue("a", "x")
            };
            var webPostActivity = new WebPostActivityNew {
                UniqueID = uniqueId, Headers = headers
            };
            var webPostActivity1 = new WebPostActivityNew {
                UniqueID = uniqueId, Headers = headers
            };

            //---------------Assert Precondition----------------
            Assert.IsNotNull(webPostActivity);
            //---------------Execute Test ----------------------
            var equals = webPostActivity.Equals(webPostActivity1);

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