public static async Task TestSetup(TestContext context)
 {
     SFApplicationHelper.RegisterServices();
     SDKServiceLocator.RegisterService<ILoggingService, Hybrid.Logging.Logger>();
     var settings = new EncryptionSettings(new HmacSHA256KeyGenerator());
     Encryptor.init(settings);
     var options = new LoginOptions(TestCredentials.LoginUrl, TestCredentials.ClientId, TestCallbackUrl, "mobile",
         TestScopes);
     var response = new AuthResponse
     {
         RefreshToken = TestCredentials.RefreshToken,
         AccessToken = TestAuthToken,
         InstanceUrl = TestCredentials.InstanceUrl,
         IdentityUrl = TestCredentials.IdentityUrl,
         Scopes = TestScopes,
     };
     Account account = await AccountManager.CreateNewAccount(options, response);
     account.UserId = TestCredentials.UserId;
     account.UserName = TestCredentials.Username;
     await OAuth2.RefreshAuthTokenAsync(account);
     _smartStore = SmartStore.GetSmartStore();
     _smartStore.ResetDatabase();
     _syncManager = SyncManager.GetInstance();
     _restClient = new RestClient(account.InstanceUrl, account.AccessToken,
         async () =>
         {
             account = AccountManager.GetAccount();
             account = await OAuth2.RefreshAuthTokenAsync(account);
             return account.AccessToken;
         }
         );
     CreateAccountsSoup();
     _idToNames = await CreateTestAccountsOnServer(CountTestAccounts);
 }
 public void Setup()
 {
     var settings = new EncryptionSettings(new HmacSHA256KeyGenerator());
     Encryptor.init(settings);
 }
 public static void init(EncryptionSettings settings)
 {
     Settings = settings;
 }
        public async Task SetUp()
        {
            var settings = new EncryptionSettings(new HmacSHA256KeyGenerator());
            Encryptor.init(settings);
            var account = TestCredentials.TestAccount;

            account = await OAuth2.RefreshAuthTokenAsync(account);
            _accessToken = account.AccessToken;

            _restClient = new RestClient(TestCredentials.InstanceUrl, _accessToken, null);
            _unauthenticatedRestClient = new RestClient(TestCredentials.InstanceUrl);
        }