Beispiel #1
0
        public void CanDelete_should_throw_exception_if_pattern_not_found()
        {
            var command = new DeletePattern {
                PatternId = patternId
            };

            Assert.Throws <DomainObjectNotFoundException>(() => GuardAppPattern.CanDelete(patterns_0, command));
        }
Beispiel #2
0
        public void CanDelete_should_not_throw_exception_if_success()
        {
            var patterns_1 = patterns_0.Add(patternId, "any", ".*", "Message");

            var command = new DeletePattern {
                PatternId = patternId
            };

            GuardAppPattern.CanDelete(patterns_1, command);
        }