Esempio n. 1
0
        public void CanDelete_should_throw_exception_if_pattern_not_found()
        {
            var command = new DeletePattern {
                PatternId = patternId
            };

            Assert.Throws <DomainObjectNotFoundException>(() => GuardAppPatterns.CanDelete(command, App(patterns_0)));
        }
Esempio n. 2
0
        public void CanDelete_should_not_throw_exception_if_command_is_valid()
        {
            var patterns_1 = patterns_0.Add(patternId, "any", ".*", "Message");

            var command = new DeletePattern {
                PatternId = patternId
            };

            GuardAppPatterns.CanDelete(command, App(patterns_1));
        }