Beispiel #1
0
 public MarketingContactEntityBuilder()
 {
     entity = new MarketingContactEntity
     {
         SolutionId = "Sup 1",
     };
 }
Beispiel #2
0
        public async Task ThenMarketingContactsExist(string solutionId, Table table)
        {
            var expected = table.CreateSet <MarketingContactEntity>().ToList();
            var contacts = await MarketingContactEntity.FetchForSolutionAsync(solutionId).ConfigureAwait(false);

            contacts.Count().Should().Be(expected.Count());
            contacts.Should().BeEquivalentTo(expected, config => config.Excluding(c => c.LastUpdated).Excluding(c => c.LastUpdatedBy).Excluding(c => c.SolutionId));
        }
 private void AssertEquivalent(MarketingContactEntity expected, IMarketingContactResult actual)
 {
     actual.Should().BeEquivalentTo(expected, config => config
                                    .Excluding(x => x.LastUpdatedBy)
                                    .Excluding(x => x.LastUpdated));
 }
Beispiel #4
0
        public async Task LastUpdatedHasUpdatedOnMarketingContact(string solutionId)
        {
            var contacts = (await MarketingContactEntity.FetchForSolutionAsync(solutionId).ConfigureAwait(false)).ToList();

            contacts.ForEach(async x => (await x.LastUpdated.SecondsFromNow().ConfigureAwait(false)).Should().BeLessOrEqualTo(5));
        }
Beispiel #5
0
        public async Task NoContactsExist(string solutionId)
        {
            var contacts = await MarketingContactEntity.FetchForSolutionAsync(solutionId).ConfigureAwait(false);

            contacts.Should().BeEmpty();
        }