Пример #1
0
        public async void ValidateCreate_Invalid_MasterIdentifier()
        {
            var service = new NrlsMaintain(_nrlsApiSettings, _fhirMaintain, _fhirSearch, _cache, _fhirValidation);

            var validation = await service.ValidateCreate <DocumentReference>(FhirRequests.Valid_Create_MasterId);

            Assert.IsType <OperationOutcome>(validation);
        }
Пример #2
0
        public async void ValidateCreate_Valid()
        {
            var service = new NrlsMaintain(_nrlsApiSettings, _fhirMaintain, _fhirSearch, _cache, _fhirValidation);

            var validation = await service.ValidateCreate <DocumentReference>(FhirRequests.Valid_Create);

            Assert.Null(validation);
        }
Пример #3
0
        public async void ValidateCreate_Invalid_Custodian()
        {
            var service = new NrlsMaintain(_nrlsApiSettings, _fhirMaintain, _fhirSearch, _sdsService, _fhirValidation);

            var validation = await service.ValidateCreate(FhirRequests.Invalid_Custodian);

            Assert.IsType <OperationOutcome>(validation);
        }
Пример #4
0
        public void ValidateCreate_Invalid_Pointer()
        {
            var service = new NrlsMaintain(_nrlsApiSettings, _fhirMaintain, _fhirSearch, _cache, _fhirValidation);


            Assert.ThrowsAsync <HttpFhirException>(async delegate
            {
                await SystemTasks.Task.Run(async() =>
                {
                    var validation = await service.ValidateCreate <DocumentReference>(FhirRequests.Invalid_Create);
                });
            });
        }