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); }
public StreetlightController(IStreetlightRepository streetlightRepository) { _dataLayer = streetlightRepository; }