Ejemplo n.º 1
0
        public void SetupTests()
        {
            _lightDriver = MockRepository.GenerateMock <ILightDriverService>();
            _testService = MockRepository.GenerateMock <IDataService>();

            _repository = new StreetlightRepository(_testService
                                                    , _lightDriver);
        }
        public void SetupTests()
        {
            _lightDriver = MockRepository.GenerateMock <ILightDriverService>();
            _lightDriver.Stub(x => x.SwitchOffBulb(Arg <Guid> .Is.Anything)).Return(GetBooleanTask(true));
            _lightDriver.Stub(x => x.SwitchOnBulb(Arg <Guid> .Is.Anything)).Return(GetBooleanTask(true));
            _testService = MockRepository.GenerateMock <IDataService>();

            _repository = new StreetlightRepository(_testService
                                                    , _lightDriver);
        }
Ejemplo n.º 3
0
 public StreetlightRepository(IDataService dataService
                              , ILightDriverService lightDriver)
 {
     _dataService = dataService;
     _lightDriver = lightDriver;
 }