Ejemplo n.º 1
0
        public async Task <Delivery> StartDelivery(
            [GraphQLType(typeof(StartDeliveryInputType))][GraphQLName("input")]
            StartDeliveryCommand input, [Service] ISheaftMediatr mediatr,
            DeliveriesByIdBatchDataLoader dataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await dataLoader.LoadAsync(input.DeliveryId, token));
        }
 public StartDeliveryCommandHandlerTest()
 {
     loadingPlaceRepo = new Mock <ILoadingPlaceRepo>();
     bus             = new Mock <IBus>();
     command         = new StartDeliveryCommand(id);
     commandHandler  = new StartDeliveryCommandHandler(loadingPlaceRepo.Object, bus.Object);
     packsToDelivery = new List <PackToDelivery> {
         new PackToDelivery(), new PackToDelivery()
     };
     loadingPlace = new LoadingPlace {
         PacksToDelivery = packsToDelivery
     };
 }