private static void ChannelsShouldBeEquivalent(Domain.Domains.Advertisement domain, Advertisement entity) { var expectedChannels = entity.AdvertisementChannels.Select(x => x.Channel); var mappedChannels = domain.Channels; mappedChannels.Should().NotBeNullOrEmpty(); mappedChannels.Should().HaveCount(expectedChannels.Count()); mappedChannels.Should().BeEquivalentTo( expectedChannels, options => options.Excluding(x => x.AdvertisementChannels)); }
private static void DetailsShouldBeEquivalent(Domain.Domains.Advertisement domain, Advertisement entity) { domain.Id.Should().Be(entity.Id); domain.Name.Should().Be(entity.Name); domain.ClientId.Should().Be(entity.ClientId); }