Ejemplo n.º 1
0
 public static void generateSessionToken()
 {
     AuthenticateJSON json = new AuthenticateJSON();
     //Set up JSON
     json.userID = TestGlobals.username;
     json.password = TestGlobals.password;
     Authenticate authCall = new Authenticate(TestGlobals.adminServer, json);
     Test authTest = new Test(authCall);
     AsyncContext.Run(async () => await new HTTPSCalls().runTest(authTest, HTTPOperation.POST));
     sessionToken = JObject.Parse(HTTPSCalls.result.Value);
 }
 //[Test()]
 public static void generateSessionToken()
 {
     AuthenticateJSON json = new AuthenticateJSON();
     //Set up JSON
     json.userID = TestGlobals.username;
     json.password = TestGlobals.password;
     Console.WriteLine(json);
     Authenticate authCall = new Authenticate(TestGlobals.adminServer, json);
     Test authTest = new Test(authCall);
     AsyncContext.Run(async () => await new HTTPSCalls().runTest(authTest, HTTPOperation.POST));
     sessionToken = JObject.Parse(HTTPSCalls.result.Value);
     string statusCode = HTTPSCalls.result.Key.GetValue("StatusCode").ToString();
     if (!statusCode.Equals("201"))
     {
         Console.WriteLine(HTTPSCalls.result.Key.ToString());
         Console.WriteLine(HTTPSCalls.result.Value);
         Console.WriteLine(sessionToken.ToString());
     }
 }