Пример #1
0
        public void EscapeScript_Same_Object_Is_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId           = Guid.NewGuid().ToString();
            var javascriptActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId, EscapeScript = true
            };
            var dsfScriptingActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId, EscapeScript = false
            };

            //---------------Assert Precondition----------------
            Assert.IsFalse(javascriptActivity.Equals(dsfScriptingActivity));
            //---------------Execute Test ----------------------
            javascriptActivity.EscapeScript   = true;
            dsfScriptingActivity.EscapeScript = true;
            var @equals = javascriptActivity.Equals(dsfScriptingActivity);

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
Пример #2
0
        public void UniqueIDDifferent_EmptyCountRecordset_Object_Is_Equal()
        {
            //---------------Set up test pack-------------------
            var dsfScriptingActivity = new DsfScriptingActivity();
            var javascriptActivity   = new DsfScriptingActivity();

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Пример #3
0
        public void Equals_Given_Different_Object_Is_Not_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId           = Guid.NewGuid().ToString();
            var javascriptActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId, DisplayName = "A"
            };
            var dsfScriptingActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId, DisplayName = "ass"
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Пример #4
0
        public void ScriptType_Different_Object_Is_Not_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId           = Guid.NewGuid().ToString();
            var javascriptActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId, ScriptType = enScriptType.JavaScript
            };
            var dsfScriptingActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId, ScriptType = enScriptType.Python
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Пример #5
0
        public void IncludeFile_Different_Object_Is_Not_Equal_CaseSensitive()
        {
            //---------------Set up test pack-------------------
            var uniqueId           = Guid.NewGuid().ToString();
            var javascriptActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId, IncludeFile = "AAA"
            };
            var dsfScriptingActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId, IncludeFile = "aaa"
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Пример #6
0
        public void IncludeFile_Same_Object_IsEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId           = Guid.NewGuid().ToString();
            var javascriptActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId, IncludeFile = "a"
            };
            var dsfScriptingActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId, IncludeFile = "a"
            };

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

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
Пример #7
0
        public void UniqueIDEquals_EmptyJavascript_Object_IsEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId             = Guid.NewGuid().ToString();
            var dsfScriptingActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId
            };
            var javascriptActivity = new DsfScriptingActivity()
            {
                UniqueID = uniqueId
            };

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

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