public void CanDelete_should_throw_exception_if_pattern_not_found() { var command = new DeletePattern { PatternId = patternId }; Assert.Throws <DomainObjectNotFoundException>(() => GuardAppPatterns.CanDelete(patterns_0, command)); }
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(patterns_1, command); }