Exemplo n.º 1
0
        public void ShouldGetCampaign()
        {
            const int pledgeCampaignId = 23;
            var       dto = GetTripCampaignDto(pledgeCampaignId);

            _tripService.Setup(m => m.GetTripCampaign(pledgeCampaignId)).Returns(dto);
            var response = _fixture.GetCampaigns(pledgeCampaignId);

            _tripService.VerifyAll();
            Assert.IsNotNull(response);
            Assert.IsInstanceOf <OkNegotiatedContentResult <TripCampaignDto> >(response);
            var r = (OkNegotiatedContentResult <TripCampaignDto>)response;

            Assert.IsNotNull(r.Content);
            Assert.AreSame(dto, r.Content);
        }