private async static Task <string> CheckWithAcrolinx(string url, string genericToken, string username) { Debug.Assert(!string.IsNullOrWhiteSpace(url), "No Acrolinx URL was provided"); Debug.Assert(!string.IsNullOrWhiteSpace(genericToken), "No generic SSO token was provided"); Debug.Assert(!string.IsNullOrWhiteSpace(username), "No username was provided"); var endpoint = new AcrolinxEndpoint(url, "SW50ZWdyYXRpb25EZXZlbG9wbWVudERlbW9Pbmx5"); var accessToken = await endpoint.SignInWithSSO(genericToken, username); var checkRequest = new CheckRequest() { CheckOptions = new CheckOptions() { CheckType = CheckType.Automated, ContentFormat = "AUTO" }, Document = new DocumentDescriptorRequest(@"c:\demo.net.txt", new System.Collections.Generic.List <CustomField>()), Content = "This is an tesst" }; var checkResult = await endpoint.Check(accessToken, checkRequest); Console.WriteLine($"Check {checkResult.Id}: {checkResult.Quality.Score} ({checkResult.Quality.Status})"); Console.WriteLine($"Acrolinx Scorecard: {checkResult.Reports["scorecard"].Link}"); return(checkResult.Reports["scorecard"].Link); }
private void CreateEndpoint() { endpoint = TestEnvironment.CreateEndpoint(); }