private void TestSSLCore(Action <SyncConfiguration> setupSecureConfig, bool openAsync) { AsyncContext.Run(async() => { var user = await SyncTestHelpers.GetUserAsync(); const string path = "~/TestSSLCore"; var realmUri = SyncTestHelpers.RealmUri(path); var config = new SyncConfiguration(user, realmUri); var secureRealmUri = SyncTestHelpers.SecureRealmUri(path); var secureConfig = new SyncConfiguration(user, secureRealmUri, config.DatabasePath + "2"); setupSecureConfig(secureConfig); using (var realm = GetRealm(config)) { realm.Write(() => { realm.Add(new IntPrimaryKeyWithValueObject { Id = 1, StringValue = "some value" }); }); await GetSession(realm).WaitForUploadAsync(); } using (var newRealm = await SyncTestHelpers.GetInstanceAsync(secureConfig, openAsync)) { CleanupOnTearDown(newRealm); var items = newRealm.All <IntPrimaryKeyWithValueObject>(); Assert.That(items.Count(), Is.EqualTo(1)); Assert.That(items.Single().StringValue, Is.EqualTo("some value")); } }); }