public void Get_ValueSet_Fail_NotFound(string domain, string id) { // Arrange var guid = new Guid(id); var controller = new ValueSetController(_fixture.ValueSetControllerLogger, _fixture.ValueSetRepository); // Act var getResult = controller.Get(new ValueSetRouteParameters() { Domain = domain, Id = guid }); ActionResult <ValueSetForRetrievalDto> okResult = ((ActionResult <ValueSetForRetrievalDto>)getResult); NotFoundResult result = (NotFoundResult)okResult.Result; // Assert Assert.Equal(404, result.StatusCode); }
// [InlineData("cdc", "REPLACEME", "REPLACEME", "REPLACEME", "REPLACEME", "REPLACEME")] public void Get_ValueSet(string domain, string id, string code, string name, string oid, string definition) { // Arrange var guid = new Guid(id); var controller = new ValueSetController(_fixture.ValueSetControllerLogger, _fixture.ValueSetRepository); // Act var getResult = controller.Get(new ValueSetRouteParameters() { Domain = domain, Id = guid }); ActionResult <ValueSetForRetrievalDto> okResult = ((ActionResult <ValueSetForRetrievalDto>)getResult); OkObjectResult result = (OkObjectResult)okResult.Result; var valueSet = (ValueSetForRetrievalDto)result.Value; // Assert Assert.Equal(200, result.StatusCode); Assert.Equal(code, valueSet.Code); Assert.Equal(name, valueSet.Name); Assert.Equal(oid, valueSet.Oid); Assert.Equal(definition, valueSet.Definition); }