public async Task CharacterUseCaseTest_GetListAsync_BN004() { // Arrange var storyInput = StoryInputFaker.Create().Generate(); storyInput.Limit = null; // Act var exception = await Assert.ThrowsAsync <BusinessException>(async() => await _storyUseCase.GetListAsync(1, storyInput)); //Assert Assert.Contains(ExceptionMessages.BN004, exception.Message); }
public async Task StoryUseCaseTest_GetListAsync_Success() { // Arrange var storyInput = StoryInputFaker.Create().Generate(); var storyDataWrapper = StoryDataWrapperFaker.Create().Generate(); // Setup _storyRepository .Setup(p => p.GetStoriesByCharacter(1, storyInput)) .Returns(Task.FromResult(storyDataWrapper)); // Act var result = await _storyUseCase.GetListAsync(1, storyInput); //Assert Assert.True(result.Data.Results.Any()); }