Esempio n. 1
0
        public async Task MsReadConfigSetTestAsync(string cognitiveServicesKey, string cognitiveServicesEndpoint)
        {
            await _controller.SetMsReadConfigsAsync(cognitiveServicesKey, cognitiveServicesEndpoint);

            await _controller.SetMsReadConfigsAsync(null, null); // Value not affected if user doesn't pass it

            // assert
            var configsFile = await _storageService.ReadFileAsStringAsync(Constants.ConfigsFileName);

            var configModel = JsonConvert.DeserializeObject <ConfigModel>(configsFile);

            Assert.Equal(cognitiveServicesKey, configModel.Parser.MsRead.CongnitiveServiceKey);
            Assert.Equal(cognitiveServicesEndpoint, configModel.Parser.MsRead.CognitiveServiceEndPoint);
        }