public void PlatformGetCurrentUserWithValidOauth()
 {
     Intuit.Ipp.PlatformService.User myuser=PlatformService.PlatformService.GetCurrentUser(ValidConsumerKey, ValidConsumerSecret,
             ValidAccessToken,ValidAccessTokenSecret);
     Assert.AreEqual("yelena", myuser.FirstName);
     Assert.AreEqual("gartsman", myuser.LastName);
     Assert.AreEqual("*****@*****.**", myuser.EmailAddress);
     Assert.IsTrue(myuser.IsVerified);
 }
 public void PlatformGetCurrentUserWithConenctionError()
 {
     try
     {
         Intuit.Ipp.PlatformService.User myuser = PlatformService.PlatformService.GetCurrentUser(ValidConsumerKey, ValidConsumerSecret,
             ValidAccessToken, ValidAccessTokenSecret);
     }
     catch (PlatformException pex)
     {
         Console.Write(pex.ErrorCode + pex.ErrorMessage);
         Assert.AreEqual("ConnectFailure", pex.ErrorCode);
         Assert.AreEqual("Unable to connect to the remote server", pex.ErrorMessage);
         return;
     }
     Assert.Fail();
 }
 public void PlatformGetCurrentUserWithInvalidOauth()
 {
     try
     {
         Intuit.Ipp.PlatformService.User myuser = PlatformService.PlatformService.GetCurrentUser(ValidConsumerKey, ValidConsumerSecret,
                 InvalidAccessToken, InvalidAccessTokenSecret);
     }
     catch (PlatformException pex)
     {
         Assert.AreEqual("22", pex.ErrorCode);
         Assert.AreEqual("This API requires Authorization.", pex.ErrorMessage);
         Assert.IsNotNull(pex.ServerTime);
         return;
     }
     Assert.Fail();
 }