public async Task CharacterUseCaseTest_GetListAsync_BN004() { // Arrange var eventInput = EventInputFaker.Create().Generate(); eventInput.Limit = null; // Act var exception = await Assert.ThrowsAsync <BusinessException>(async() => await _eventUseCase.GetListAsync(1, eventInput)); //Assert Assert.Contains(ExceptionMessages.BN004, exception.Message); }
public async Task EventUseCaseTest_GetListAsync_Success() { // Arrange var eventInput = EventInputFaker.Create().Generate(); var eventDataWrapper = EventDataWrapperFaker.Create().Generate(); // Setup _eventRepository .Setup(p => p.GetEventsByCharacter(1, eventInput)) .Returns(Task.FromResult(eventDataWrapper)); // Act var result = await _eventUseCase.GetListAsync(1, eventInput); //Assert Assert.True(result.Data.Results.Any()); }