public async Task RetrieveNewCharacterIdFromRepository() { var expectedCharacter = new Domain.RpgCharacter(); repository.Create().Returns(expectedCharacter); var response = await handler.Handle(new CreateRpgCharacterRequest(), CancellationToken.None); response.CharacterId.Should().Be(expectedCharacter.Id); }
public async Task <CreateRpgCharacterResponse> Handle(CreateRpgCharacterRequest request, CancellationToken cancellationToken) { var character = await repository.Create(); return(new CreateRpgCharacterResponse(character.Id)); }