public void Get_by_email_returns_expected_results(string email, Type responseType) { var controller = new ExampleController(Helpers.MockExampleBusinessLogic(), Helpers.MockIAppSettings()); var response = controller.GetByEmail(email); response.Should().BeOfType(responseType); if (response is OkObjectResult) { var result = ((OkObjectResult)response).Value as ExampleModel; Assert.IsTrue(result.Equals(Helpers.TestModel)); } }