Beispiel #1
0
        public void FileWriteActivity_AppendBottom_Same_Object_Is_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId         = Guid.NewGuid().ToString();
            var rabbitMqActivity = new FileWriteActivity()
            {
                UniqueID = uniqueId, Result = "A"
            };
            var rabbitMqActivity1 = new FileWriteActivity()
            {
                UniqueID = uniqueId, Result = "A"
            };

            //---------------Assert Precondition----------------
            Assert.IsTrue(rabbitMqActivity.Equals(rabbitMqActivity1));
            //---------------Execute Test ----------------------
            rabbitMqActivity.AppendBottom  = true;
            rabbitMqActivity1.AppendBottom = true;
            var @equals = rabbitMqActivity.Equals(rabbitMqActivity1);

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
Beispiel #2
0
        public void FileWriteActivity_IsContentBase64_Same_Object_Is_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId = Guid.NewGuid().ToString();
            var sut_one  = new FileWriteActivity()
            {
                UniqueID = uniqueId, Result = "A"
            };
            var sut_two = new FileWriteActivity()
            {
                UniqueID = uniqueId, Result = "A"
            };

            //---------------Assert Precondition----------------
            Assert.IsTrue(sut_one.Equals(sut_two));
            //---------------Execute Test ----------------------
            sut_one.FileContentsAsBase64 = true;
            sut_two.FileContentsAsBase64 = true;
            var @equals = sut_one.Equals(sut_two);

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
Beispiel #3
0
        public void FileWriteActivity_Overwrite_Different_Object_Is_Not_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId         = Guid.NewGuid().ToString();
            var rabbitMqActivity = new FileWriteActivity()
            {
                UniqueID = uniqueId, Result = "A",
            };
            var rabbitMqActivity1 = new FileWriteActivity()
            {
                UniqueID = uniqueId, Result = "A"
            };

            //---------------Assert Precondition----------------
            Assert.IsTrue(rabbitMqActivity.Equals(rabbitMqActivity1));
            //---------------Execute Test ----------------------
            rabbitMqActivity.Overwrite  = true;
            rabbitMqActivity1.Overwrite = false;
            var @equals = rabbitMqActivity.Equals(rabbitMqActivity1);

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Beispiel #4
0
        public void FileWriteActivity_UniqueIDDifferent_EmptyFileRead_Object_Is_Not_Equal()
        {
            //---------------Set up test pack-------------------
            var fileRead  = new FileWriteActivity();
            var fileRead1 = new FileWriteActivity();

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Beispiel #5
0
        public void FileWriteActivity_FileContents_Different_Object_Is_Not_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId = Guid.NewGuid().ToString();
            var fileRead = new FileWriteActivity()
            {
                UniqueID = uniqueId, FileContents = "A"
            };
            var fileRead1 = new FileWriteActivity()
            {
                UniqueID = uniqueId, FileContents = "ass"
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Beispiel #6
0
        public void FileWriteActivity_Password_Same_Object_IsEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId = Guid.NewGuid().ToString();
            var fileRead = new FileWriteActivity()
            {
                UniqueID = uniqueId, Password = "******"
            };
            var fileRead1 = new FileWriteActivity()
            {
                UniqueID = uniqueId, Password = "******"
            };

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

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
Beispiel #7
0
        public void FileWriteActivity_PrivateKeyFile_Different_Object_Is_Not_Equal_CaseSensitive()
        {
            //---------------Set up test pack-------------------
            var uniqueId = Guid.NewGuid().ToString();
            var fileRead = new FileWriteActivity()
            {
                UniqueID = uniqueId, PrivateKeyFile = "AAA"
            };
            var fileRead1 = new FileWriteActivity()
            {
                UniqueID = uniqueId, PrivateKeyFile = "aaa"
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Beispiel #8
0
        public void FileWriteActivity_UniqueIDEquals_EmptyFileRead_Object_IsEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId = Guid.NewGuid().ToString();
            var fileRead = new FileWriteActivity()
            {
                UniqueID = uniqueId
            };
            var DsfFileWrite = new FileWriteActivity()
            {
                UniqueID = uniqueId
            };

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

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