public void StringsMatch() { var input = new InputObject { Str1 = "string", Str2 = "string" }; var result = _valuesController.CompareStrings(input); var okObjectResult = result as OkObjectResult; Assert.NotNull(okObjectResult); var returnObj = okObjectResult.Value as ReturnObject; Assert.True(returnObj.Result, "string should equal string"); }