Beispiel #1
0
        public async Task HandleAsync_GivenGetSentOnAatfSiteRequest_DataAccessIsCalled()
        {
            var id = Guid.NewGuid();

            await handler.HandleAsync(new GetSentOnAatfSite(id));

            A.CallTo(() => sentOnDataAccess.GetWeeeSentOnSiteAddress(id)).MustHaveHappened(Repeated.Exactly.Once);
        }
Beispiel #2
0
        public async Task <AatfAddressData> HandleAsync(GetSentOnAatfSite message)
        {
            authorization.EnsureCanAccessExternalArea();

            var aatfAddress = await getSentOnAatfSiteDataAccess.GetWeeeSentOnSiteAddress(message.WeeeSentOnId);

            var addressData = mapper.Map(aatfAddress);

            return(addressData);
        }