public void SourceDetail_OnExecute_ReturnSourceDetail() { //Arrange ExpensesController controller = new ExpensesController(_repo, _logger); //Act var inputDataSource = controller.SourceDetail(); var requestResult = inputDataSource as OkObjectResult; InputDataSource result = (InputDataSource)requestResult.Value; //Assert Assert.AreEqual(_repo.GetSourceDetails().InputDataSourceName, result.InputDataSourceName); Assert.AreEqual(_repo.GetSourceDetails().InputDataSourceType, result.InputDataSourceType); }
public IActionResult SourceDetail() { InputDataSource ds = _repo.GetSourceDetails(); _logger.LogInformation(200, "SourceDetail request complete"); return(Ok(ds)); }