public void Test_construction_with_mixed_null_parameters_throws_null_exception(IReader reader, IMapper mapper, IWriter writer, IMessageHub hub, ILogger logger) { // Arrange. // Act. // Assert. Assert.Throws <ArgumentNullException>(() => _processor = new FootballProcessor(reader, mapper, writer, hub, logger)); }
public FootballProcessorTests() { _reader = Substitute.For <IReader>(); _mapper = Substitute.For <IMapper>(); _writer = Substitute.For <IWriter>(); _logger = Substitute.For <ILogger>(); _messageHub = Substitute.For <IMessageHub>(); _processor = new FootballProcessor(_reader, _mapper, _writer, _messageHub, _logger); }
public IComponent CreateComponent(IMessageHub hub, string fileName) { var file = FootballConfig.GetFileSystem(); var logger = FootballConfig.GetLoggerConfiguration(); var reader = new FootballReader(file, logger); var mapper = new FootballMapper(logger); var writer = new FootballWriter(logger); var processor = new FootballProcessor(reader, mapper, writer, hub, logger); _footballComponent = new Types.FootballComponent(reader, mapper, writer, processor, fileName); return(_footballComponent); }