Beispiel #1
0
 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));
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
        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);
        }