public GetBulkUploadTemplateHandlerTests()
 {
     notificationId    = Guid.NewGuid();
     documentGenerator = A.Fake <IMovementDocumentGenerator>();
     A.CallTo(() => documentGenerator.GenerateBulkUploadTemplate(notificationId, A <BulkType> .Ignored)).Returns(new byte[FileSize]);
     handler = new GetBulkUploadTemplateHandler(documentGenerator);
 }
        public async Task GenerateTemplateCallsGenerator()
        {
            await handler.HandleAsync(new GetBulkUploadTemplate(notificationId, BulkType.Prenotification));

            A.CallTo(() => documentGenerator.GenerateBulkUploadTemplate(notificationId, BulkType.Prenotification))
            .MustHaveHappened(Repeated.Exactly.Once);
        }
示例#3
0
 public async Task <byte[]> HandleAsync(GetBulkUploadTemplate message)
 {
     return(await generator.GenerateBulkUploadTemplate(message.NotificationId, message.BulkType));
 }