public void Setup() { var loadout = new Loadout(); loadout.Equip(new CloakOfSpikes()); _userRepository.Setup(repo => repo.GetUser(User)).Returns(new User() { Id = "testuser", Loadout = loadout }); _equipmentRepository.Setup(repo => repo.UnequipItem(It.IsAny <User>(), EquipmentSlot.Body)).Returns(new CloakOfSpikes()); _inventoryCommands = new InventoryCommands(_userRepository.Object, _slack.Object, _inventoryRepository.Object, _equipmentRepository.Object, _userService.Object); }
public void Setup() { var loadout = new Loadout(); loadout.Equip(new EquipmentItem() { Slot = EquipmentSlot.Body }); _user = new User() { Id = "testuser", Loadout = loadout }; _userRepository.Setup(repo => repo.GetUser(User)).Returns(_user); _equipmentRepository.Setup(repo => repo.UnequipItem(It.IsAny <User>(), EquipmentSlot.Body)).Returns(new EquipmentItem()); _inventoryService = new InventoryService(_actionFactory.Object, _inventoryRepository.Object, _userService.Object, _slack.Object, _targetActionFactory.Object, _equipmentRepository.Object); }