Esempio n. 1
0
        public void getTranslation([Values("trifle")] string text)
        {
            BingAPIClient myClient = new BingAPIClient();

            string translatedText = myClient.translate(text, BingAPIClient.ARABIC);

            Assert.NotNull(translatedText);

            Assert.Pass(translatedText);
        }
Esempio n. 2
0
 public HomeController(ILogger <HomeController> logger, IOptions <AppSettings> appSettings)
 {
     _logger       = logger;
     AppSettings   = appSettings?.Value;
     bingAPIClient = new BingAPIClient(AppSettings.Host, AppSettings.BingAPIKey);
 }