public async Task UpdateLeagueShouldUpdateDbEntity() { var command = new UpdateLeague() { Id = _testDbFixture.MockedDataInstance.LeagueForUpdateId, Name = "AAA", Description = "BBB", LeagueType = new LeagueType() { Name = "None" } }; var creationTask = await _rabbitMqFixture.SubscribeAndGetAsync <LeagueUpdated>( _testDbFixture.GetLeagueById, command.Id); await _rabbitMqFixture.PublishAsync(command); var league = await creationTask.Task; league.Should().NotBeNull(); league.Name.Should().Be(command.Name); league.Description.Should().Be(command.Description); league.Type.Name.Should().Be(command.LeagueType.Name); }
public async Task <IActionResult> UpdateLeague(UpdateLeague command) { return(await SendAsync(command)); }