Exemplo n.º 1
0
 public LightsService(
     IBusPublisher busPublisher, 
     IColourRepository colourRepository, 
     IDateTimeProvider dateTimeProvider,
     IMetricWriter metricWriter)
 {
     _busPublisher = busPublisher;
     _dateTimeProvider = dateTimeProvider;
     _metricWriter = metricWriter;
     _lightDisplayParser = new LightDisplayParser(colourRepository);
 }
Exemplo n.º 2
0
        public PetRepository(IColourRepository colourService, IPetTypeRepository petTypeService, IPersonRepository personService)
        {
            _crep  = colourService;
            _ptrep = petTypeService;
            _prep  = personService;

            if (_nextId < 1)
            {
                _nextId = 1;
            }
            if (_pets == null)
            {
                _pets = new List <Pet>();
            }
        }
Exemplo n.º 3
0
        public void SetUp()
        {
            _busPublisher = Substitute.For<IBusPublisher>();
            _colourRepository = Substitute.For<IColourRepository>();
            _dateTimeProvider = Substitute.For<IDateTimeProvider>();
            _metricWriter = Substitute.For<IMetricWriter>();
            _lightsService = new LightsService(_busPublisher, _colourRepository, _dateTimeProvider, _metricWriter);

            var red = new Colour("red", "ff0000");
            var green = new Colour("green", "00ff00");
            var blue = new Colour("blue", "0000ff");

            GivenTheColourRepositoryReturns(red, green, blue);

            _dateTimeProvider.UtcNow().Returns(new DateTime(2015, 1, 1, 0, 0, 0, DateTimeKind.Utc));
        }
Exemplo n.º 4
0
 public ColoursController(IColourRepository colourRepository)
 {
     ColourRepository = colourRepository;
 }
 public ColourController(IStuffRepository stuffRepository, IColourRepository colourRepository, IColourManager colourManager)
 {
     _stuffRepository  = stuffRepository;
     _colourRepository = colourRepository;
     _colourManager    = colourManager;
 }
Exemplo n.º 6
0
 public LightDisplayParser(IColourRepository colourRepository)
 {
     _colourRepository = colourRepository;
     _lightDisplayFactory = new LightDisplayFactory();
 }
 public ColourService(IColourRepository colourRepository)
 {
     _colourRepository = colourRepository;
 }
 public PeopleController(IPeopleRepository personRepository, IColourRepository colorRepository)
 {
     _personRepository = personRepository;
     _colorRepository  = colorRepository;
 }
 public ColourService(IColourRepository colourService)
 {
     _crep = colourService;
 }
Exemplo n.º 10
0
 public ColourManager(IColourRepository colourRepository)
 {
     _colourRepository = colourRepository;
 }