public void SetUp() { DatabaseProviderFactory dbFactory = new DatabaseProviderFactory(Context); db = dbFactory.CreateDefaultDatabase(); unencryptedBackingStore = new DataBackingStore(db, "encryptionTests", null); unencryptedBackingStore.Flush(); }
public void TestInitialize() { firstCache = new DataBackingStore(new SqlDatabase(@"server=(local)\SQLEXPRESS;database=Caching;Integrated Security=true"), "Partition1", null); secondCache = new DataBackingStore(new SqlDatabase(@"server=(local)\SQLEXPRESS;database=Caching;Integrated Security=true"), "Partition2", null); firstCache.Flush(); secondCache.Flush(); }
public void SetUp() { DatabaseProviderFactory dbFactory = new DatabaseProviderFactory(ConfigurationSourceFactory.Create()); db = dbFactory.CreateDefault(); unencryptedBackingStore = new DataBackingStore(db, "encryptionTests", null); unencryptedBackingStore.Flush(); ProtectedKey key = KeyManager.GenerateSymmetricKey(typeof(RijndaelManaged), DataProtectionScope.CurrentUser); using (FileStream stream = new FileStream("ProtectedKey.file", FileMode.Create)) { KeyManager.Write(stream, key); } }
public void SetUp() { // to force mstest to copy the assembly var ignored = typeof(Caching.Cryptography.SymmetricStorageEncryptionProvider).GetConstructors(); DatabaseProviderFactory dbFactory = new DatabaseProviderFactory(ConfigurationSourceFactory.Create()); db = dbFactory.CreateDefault(); unencryptedBackingStore = new DataBackingStore(db, "encryptionTests", null); unencryptedBackingStore.Flush(); ProtectedKey key = KeyManager.GenerateSymmetricKey(typeof(RijndaelManaged), DataProtectionScope.CurrentUser); using (FileStream stream = new FileStream("ProtectedKey.file", FileMode.Create)) { KeyManager.Write(stream, key); } }
public void ClearCaches() { firstCache.Flush(); secondCache.Flush(); }
public void TestCleanup() { firstCache.Flush(); secondCache.Flush(); }