コード例 #1
0
        public void DecisionCreatePDFAsync_ReturnsByteArray_Test(int decisionId)
        {
            _repository.Setup(rep => rep.Decesion.GetFirstAsync(It.IsAny <Expression <Func <Decesion, bool> > >(),
                                                                It.IsAny <Func <IQueryable <Decesion>, IIncludableQueryable <Decesion, object> > >()))
            .ReturnsAsync(Decesions.FirstOrDefault());
            _decisionBlobStorage.Setup(blob => blob.GetBlobBase64Async(It.IsAny <string>())).ReturnsAsync("Blank");

            var actualReturn = _pdfService.DecisionCreatePDFAsync(decisionId);

            _repository.Verify(rep => rep.Decesion.GetFirstAsync(It.IsAny <Expression <Func <Decesion, bool> > >(),
                                                                 It.IsAny <Func <IQueryable <Decesion>, IIncludableQueryable <Decesion, object> > >()), Times.Once);
            Assert.IsInstanceOf <byte[]>(actualReturn.Result);
        }