public async Task UpdateAsync_ShouldUpdateTheItemEntry() { var originalChannel = SetupChannel(); var updatedChannel = new Domain.Domains.Channel { Id = originalChannel.Id, IsDigital = _fixture.Create <bool>(), Name = $"{originalChannel.Name} - Updated" }; await _channelRepository.UpdateAsync(updatedChannel); var currentValue = _dbContext.Channels .AsNoTracking() .Single(x => x.Id == updatedChannel.Id); currentValue.Name.Should().Be(updatedChannel.Name); currentValue.IsDigital.Should().Be(updatedChannel.IsDigital); }
private static void DomainShouldBeEquivalent(Domain.Domains.Channel channel, Channel expectedChannel) { channel.Should().BeEquivalentTo( expectedChannel, options => options.Excluding(x => x.AdvertisementChannels)); }