public TrafficController( ILogger <TrafficController> logger, ISpeedingViolationCalculator speedingViolationCalculator, GovernmentService governmentService) { _logger = logger; _speedingViolationCalculator = speedingViolationCalculator; _governmentService = governmentService; _roadId = speedingViolationCalculator.GetRoadId(); }
public void Setup() { _governmentRepository.Setup(repo => repo.GetGovernment()).Returns(new Doug.Models.Government { Ruler = "wgf", RevolutionLeader = "gab" }); _oldRuler = new User { Id = "wgf", Loadout = new Loadout { Head = new EquipmentItem() } }; _newRuler = new User(); _userRepository.Setup(repo => repo.GetUser("wgf")).Returns(_oldRuler); _userRepository.Setup(repo => repo.GetUser("gab")).Returns(_newRuler); _governmentService = new GovernmentService(_governmentRepository.Object, _slack.Object, _userService.Object, _userRepository.Object, _equipmentRepository.Object, _inventoryRepository.Object, _itemRepository.Object); }