Esempio n. 1
0
        public void RabbitSource_Different_Object_Is_Not_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId         = Guid.NewGuid().ToString();
            var rabbitMqActivity = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = "A",
            };
            var rabbitMqActivity1 = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = "A",
            };

            //---------------Assert Precondition----------------
            Assert.IsTrue(rabbitMqActivity.Equals(rabbitMqActivity1));
            //---------------Execute Test ----------------------
            rabbitMqActivity.RabbitMQSource = new RabbitMQSource()
            {
                ResourceID = Guid.NewGuid()
            };
            rabbitMqActivity1.RabbitMQSource = new RabbitMQSource();
            var @equals = rabbitMqActivity.Equals(rabbitMqActivity1);

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Esempio n. 2
0
        public void IsAutoDelete_Same_Object_Is_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId         = Guid.NewGuid().ToString();
            var rabbitMqActivity = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = "A"
            };
            var rabbitMqActivity1 = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = "A"
            };

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

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
Esempio n. 3
0
        public void UniqueIDDifferent_EmptyPublishRabbitMQ_Is_Not_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId          = Guid.NewGuid().ToString();
            var rabbitMqActivity  = new DsfPublishRabbitMQActivity();
            var rabbitMqActivity1 = new DsfPublishRabbitMQActivity();

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Esempio n. 4
0
        public void Result_Different_Object_Is_Not_Equal()
        {
            //---------------Set up test pack-------------------
            var uniqueId    = Guid.NewGuid().ToString();
            var multiAssign = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = ""
            };
            var multiAssign1 = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = "a"
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Esempio n. 5
0
        public void RabbitMQSourceResourceId_Different_Object_Is_Not_Equal_CaseSensitive()
        {
            //---------------Set up test pack-------------------
            var uniqueId    = Guid.NewGuid().ToString();
            var multiAssign = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = "A", DisplayName = "A", RabbitMQSourceResourceId = Guid.Empty
            };
            var multiAssign1 = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = "A", DisplayName = "a", RabbitMQSourceResourceId = Guid.Empty.ToString().ToLower().ToGuid()
            };

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

            //---------------Test Result -----------------------
            Assert.IsFalse(@equals);
        }
Esempio n. 6
0
        public void RabbitMQSourceResourceId_Same_Object_IsEqual()
        {
            //---------------Set up test pack-------------------
            var uniqueId    = Guid.NewGuid().ToString();
            var multiAssign = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = "", RabbitMQSourceResourceId = Guid.Empty
            };
            var multiAssign1 = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = "", RabbitMQSourceResourceId = Guid.Empty
            };

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

            //---------------Test Result -----------------------
            Assert.IsTrue(@equals);
        }
Esempio n. 7
0
        public void Message_Different_Object_Is_Not_Equal_CaseSensitive()
        {
            //---------------Set up test pack-------------------
            var uniqueId    = Guid.NewGuid().ToString();
            var multiAssign = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = "A", QueueName = "AAA", Message = "KLKL"
            };
            var multiAssign1 = new DsfPublishRabbitMQActivity()
            {
                UniqueID = uniqueId, Result = "A", QueueName = "AAA", Message = "klkl"
            };

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

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