Exemplo n.º 1
0
 public void GetAuthUrlTest()
 {
     OAuth2 target = new OAuth2(userAgent, server);
     string clientID = devKey; // Dev Key
     string redirectUrl = "http://www.wittsell.com/default.asp"; // TODO: Initialize to an appropriate value
     string userState = string.Empty; // TODO: Initialize to an appropriate value
     string language = string.Empty; // TODO: Initialize to an appropriate value
     string expected = string.Empty; // TODO: Initialize to an appropriate value
     string actual;
     actual = target.GetAuthUrl(clientID, redirectUrl, userState, language);
     //Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 2
0
 public void GetAccessTokenTest()
 {
     OAuth2 target = new OAuth2(userAgent, server);
     string clientID = devKey; // Dev Key
     string authCode = "88-36-13-9982-57-78-1373-105-119-121-56-153915-9656-73102-32-47-91-104-11890-118-37-1811281-123";
     OAuth2AccessTokenEventArgs expected = null; // TODO: Initialize to an appropriate value
     OAuth2AccessTokenEventArgs actual;
     actual = target.GetAccessToken(clientID, authCode);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 3
0
        public void GetAccessTokenAsyncTest()
        {
            this._TestTrigger = new AutoResetEvent(false);

            OAuth2 target = new OAuth2(userAgent, server);
            string clientID = devKey; // Dev Key
            string authCode = string.Empty; // TODO: Initialize to an appropriate value
            target.GetAccessTokenCompleted += new OAuth2.GetAccessTokenCompletedEventHandler(target_GetAccessTokenCompleted);
            target.GetAccessTokenAsync(clientID, authCode);
            
            this._TestTrigger.WaitOne();
        }