public void ShouldRecordErrorIfUnableToParseTheInput() { var collector = new ErrorCollector(); Assert.False(collector.ContainsErrors); var mapper = new Mapper<SpecifiedOrderTargetType>(collector); mapper.Map(new[] {"4,787a", "hello" }); Assert.True(collector.ContainsErrors); Console.WriteLine(collector.ToString()); // if you're interested }
public void ShouldRecordErrorIfNotEnoughColumnsToExtractFrom() { var collector = new ErrorCollector(); Assert.False(collector.ContainsErrors); var mapper = new Mapper<DefaultOrderTargetType>(collector); mapper.Map(new[] {"hello", "4"}); Assert.True(collector.ContainsErrors); Console.WriteLine(collector.ToString()); // if you're interested }