public async Task DeleteStatistic_ValidInput_ReturnSuccess() { // Arrange var charProvider = new MockCharacterProvider(); var statProvider = new MockStatisticProvider(); var controller = new StatisticController(charProvider, statProvider, new GenericProgressionStrategy(statProvider, new StatisticOptions())); // Act var result = await controller.DeleteStatisticAsync("strength"); // Assert Assert.Equal(result, StatisticResult.StatisticDeletedSuccessfully()); }
public async Task DeleteStatistic_InvalidStatName_ReturnNotFound() { // Arrange var charProvider = new MockCharacterProvider(); var statProvider = new MockStatisticProvider(); var controller = new StatisticController(charProvider, statProvider, new GenericProgressionStrategy(statProvider, new StatisticOptions())); // Act var result = await controller.DeleteStatisticAsync("bacon"); // Assert Assert.Equal(result, StatisticResult.StatisticNotFound()); }
public async Task DeleteStatisticAsync([Remainder] string statName) { var result = await _statController.DeleteStatisticAsync(statName); await ReplyAsync(result.Message); }