Пример #1
0
        private void AssertRetrievedAdvertisementMatchesExpected(AllFieldsInitializer builderInitializer, string advertisementId, AdvertisementResource result)
        {
            AdvertisementResource expectedResult = new AdvertisementResourceBuilder(builderInitializer)
                                                   .WithId(new Guid(advertisementId))
                                                   .WithLinks(advertisementId)
                                                   .WithProcessingStatus(ProcessingStatus.Completed)
                                                   .Build();

            result.ShouldBeEquivalentTo(expectedResult);
        }
Пример #2
0
        private void AssertReturnedAdvertisementMatchesExpectedExpiredAdvertisement(string advertisementId, DateTime expiryDate, AdvertisementResource result)
        {
            AdvertisementResource expectedResult = new AdvertisementResourceBuilder(this.AllFieldsInitializer)
                                                   .WithId(new Guid(advertisementId))
                                                   .WithLinks(advertisementId)
                                                   .WithState(AdvertisementState.Expired)
                                                   .WithExpiryDate(expiryDate)
                                                   .Build();

            result.ShouldBeEquivalentTo(expectedResult);
        }