コード例 #1
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)
                .WithAgentId(null)
                .Build();

            result.ShouldBeEquivalentTo(expectedResult);
        }
コード例 #2
0
        private void AssertRetrievedAdvertisementMatchesExpected(AllFieldsInitializer builderInitializer, string advertisementId, AdvertisementResource result)
        {
            AdvertisementResource expectedResult = new AdvertisementResourceBuilder(builderInitializer)
                .WithId(new Guid(advertisementId))
                .WithLinks(advertisementId)
                .WithProcessingStatus(ProcessingStatus.Pending)
                .WithAgentId(null)
                .Build();

            result.ShouldBeEquivalentTo(expectedResult);
        }