public void ExcludeWords_ByRule() { var words = new[] { "one", "two", "three" }; reader.ReadWords().Returns(words); processor.AddExcludingRule(x => x.Length > 3); provider.GetWords().ShouldBeEquivalentTo(new[] { "one", "two" }); }
public void Run() { var options = AskOptions(); if (options == null) { return; } var settings = GetSettings(options); reader.Path = options.InputFile; processor.AddExcludingRule(x => x.Length <= 3); var result = creator.Create(settings); if (result.IsSuccess) { SaveImage(result.GetValueOrThrow(), options.OutputFile); } else { Console.WriteLine(result.Error); } }