public CharacterFactoryTests() { // Provide a seed to the DiceRollService to get deterministic results for testing. var diceRollService = new DiceRollService(1); var hitDiceService = new HitDiceService(diceRollService); _instance = new CharacterFactory(hitDiceService); }
public ApplicationServiceTests() { // Create mocks of the dependencies _characterRepository = new Mock <ICharacterRepository>(); _eventBus = new Mock <IEventBus>(); // Create the character factory - Provide a seed to the DiceRollService to get deterministic results for testing. var diceRollService = new DiceRollService(1); var hitDiceService = new HitDiceService(diceRollService); var characterFactory = new CharacterFactory(hitDiceService); _instance = new ApplicationService(_characterRepository.Object, _eventBus.Object, characterFactory); }
public EventCallback <MouseEventArgs> SetStatus(BehaviourChartColumn behaviourChartColumn) { DiceRoll = DiceRollService.GetRoll(); Enemy.Status = behaviourChartColumn.GetStatus(DiceRoll); string action = ""; ActionsService.Actions.TryGetValue(Enemy.Status, out action); Enemy.Action = action; return(new EventCallback <MouseEventArgs>()); }