public void getTranslation([Values("trifle")] string text) { BingAPIClient myClient = new BingAPIClient(); string translatedText = myClient.translate(text, BingAPIClient.ARABIC); Assert.NotNull(translatedText); Assert.Pass(translatedText); }
public HomeController(ILogger <HomeController> logger, IOptions <AppSettings> appSettings) { _logger = logger; AppSettings = appSettings?.Value; bingAPIClient = new BingAPIClient(AppSettings.Host, AppSettings.BingAPIKey); }