コード例 #1
0
        public async Task ParsesEntitiesCorrectly()
        {
            var mockClient = MockHelper.GetMockHttpClient(MockHelper.JsonToLoad.Entities);
            var trc        = new TextRazorClient(mockClient.Object);
            var response   = await trc.Analyze("Anything", ExtratorsType.Entities);

            response.Response.Entities.Count().Should().BeGreaterThan(0);
        }
コード例 #2
0
 public async Task ThrowsArgumentException_WhenSenses_ButNoWords()
 {
     var trc = new TextRazorClient(_config["Endpoint"], _config["ApiKey"]);
     await Assert.ThrowsAsync <ArgumentException>(() => trc.Analyze("Anything", ExtratorsType.Senses));
 }
コード例 #3
0
 public async Task ThrowsArgumentException_WhenSenses_ButNoWords()
 {
     var trc = new TextRazorClient(EmptyHttpClient);
     await Assert.ThrowsAsync <ArgumentException>(() => trc.Analyze("Anything", ExtratorsType.Senses));
 }