コード例 #1
0
        public void SuccessMessageTemplate_returns_template_directly_if_passed_a_null_RuleEvaluation()
        {
            var templateString  = "{this} and {that}";
            var messageTemplate = new SuccessMessageTemplate(templateString);

            var message = messageTemplate.GetMessage(null);

            Assert.That(message, Is.EqualTo(templateString));
        }
コード例 #2
0
        public void SuccessMessageTemplate_cannot_receive_null_RuleEvaluation()
        {
            var messageTemplate = new SuccessMessageTemplate(e =>
            {
                Assert.That(e, Is.Not.Null);
                return("");
            });

            messageTemplate.GetMessage(null);
        }