Example #1
0
        public void Evaluate_IsInSelectedPersona_ReturnsTrue()
        {
            var condition = new IsInPersonaConditionType {
                PersonaName = PERSONA_NAME
            };

            Assert.That(condition.Evaluate(), Is.True);
        }
Example #2
0
        public void Evaluate_IsNotInSelectedPersona_ReturnsFalse()
        {
            var condition = new IsInPersonaConditionType {
                PersonaName = OTHER_PERSONA_NAME
            };

            Assert.That(condition.Evaluate(), Is.False);
        }
Example #3
0
        public void Evaluate_IsNotInPersona_ReturnsFalse()
        {
            service.GetExistingContact(Arg.Any <IUserInfo>(), Arg.Any <bool>()).Returns(contact);

            var condition = new IsInPersonaConditionType {
                PersonaName = PERSONA_NAME
            };

            Assert.That(condition.Evaluate(), Is.False);
        }
Example #4
0
        public void Evaluate_CurrentContactIsNull_ReturnsFalse()
        {
            checker.CanProcessContactInCurrentContext().Returns(false);

            var condition = new IsInPersonaConditionType {
                PersonaName = PERSONA_NAME
            };

            Assert.Multiple(() =>
            {
                Assert.That(ContactManagementContext.GetCurrentContact(), Is.Null);
                Assert.That(condition.Evaluate(), Is.False);
            });
        }