public void ParseRead_ExpectOperationOutcomeWhenNull() { var baseService = new FhirBaseStub(_nrlsApiSettings); var actual = baseService.ParseReadStub <Bundle>(null, "testid"); Assert.Equal(ResourceType.OperationOutcome, actual.ResourceType); }
public void ParseRead_ExpectOperationOutcomeWhenNull() { var baseService = new FhirBaseStub(_nrlsApiSettings); Assert.Throws <HttpFhirException>(() => { var actual = baseService.ParseReadStub <Bundle>(null, "testid"); }); }
public void ParseRead_ExpectOperationOutcomeWhenEmpty() { var organisations = new List <Organization>(); var bundle = FhirBundle.GetBundle(organisations); var baseService = new FhirBaseStub(_nrlsApiSettings); var actual = baseService.ParseReadStub(bundle, "testid"); Assert.Equal(ResourceType.OperationOutcome, actual.ResourceType); }
public void ParseRead_ExpectOperationOutcomeWhenEmpty() { var organisations = new List <Organization>(); var bundle = FhirBundle.GetBundle(organisations); var baseService = new FhirBaseStub(_nrlsApiSettings); Assert.Throws <HttpFhirException>(() => { var actual = baseService.ParseReadStub(bundle, "testid"); }); }
public void ParseRead_ExpectOrganization() { var organisation = new Organization { Id = "testid", Name = "TestName" }; var baseService = new FhirBaseStub(_nrlsApiSettings); var actual = baseService.ParseReadStub(organisation, "testid"); Assert.Equal(ResourceType.Organization, actual.ResourceType); }
public void ParseRead_ExpectBundle() { var organisations = new List <Organization> { new Organization { Id = "testid", Name = "TestName" } }; var bundle = FhirBundle.GetBundle(organisations); var baseService = new FhirBaseStub(_nrlsApiSettings); var actual = baseService.ParseReadStub(bundle, "testid"); Assert.Equal(ResourceType.Bundle, actual.ResourceType); }