Beispiel #1
0
        public async void GetPointerDocument_Valid()
        {
            //this does not really prove much

            var docSvc = new DocumentsServices(_extApiMock, _apiMock, _sdsMock, _fhirConnectorMock);

            var actual = await docSvc.GetPointerDocument("20000000017", "fromODS", "X27", "http://pointer.url");

            Assert.IsType <Binary>(actual);
            Assert.NotNull(actual);

            var binary = actual as Binary;

            Assert.Equal("application/pdf", binary.ContentType);
            Assert.Equal(Encoding.UTF8.GetBytes("pdf.bytes"), binary.Content);
        }
Beispiel #2
0
        public void GetPointerDocument_NullToODS()
        {
            var docSvc = new DocumentsServices(_extApiMock, _apiMock, _sdsMock, _fhirConnectorMock);

            Assert.ThrowsAsync <HttpFhirException>(async() => await docSvc.GetPointerDocument("20000000017", "fromODS", null, "http://pointer.url"));
        }