public void get_trading_name_returns_expected_value_when_present() { _qnaApiClient .Setup(x => x.GetAnswerValue(_applicationId, RoatpWorkflowSequenceIds.Preamble, RoatpWorkflowSectionIds.Preamble, RoatpWorkflowPageIds.Preamble, RoatpPreambleQuestionIdConstants.UkrlpTradingName)).ReturnsAsync(ValueOfQuestion); var actualResult = _controller.GetTradingName(_applicationId).Result; Assert.AreEqual(ValueOfQuestion, actualResult); }
public void GetTradingName_QnaUnavailable_ThrowsException() { _controller = new GatewayChecksController(null, _logger.Object, _lookupService.Object); Assert.ThrowsAsync <ServiceUnavailableException>(() => _controller.GetTradingName(_applicationId)); }