public void TestCreate() { var dir = Path.Combine(Path.GetTempPath().Replace("cache", "files"), "CouchbaseLite"); Database.Delete("db", dir); var options = new DatabaseConfiguration { Directory = dir }; try { var db = new Database("db", options); options = db.Config; db.Dispose(); } finally { Database.Delete("db", dir); } #if COUCHBASE_ENTERPRISE options.Invoking(o => o.EncryptionKey = new EncryptionKey("foo")).ShouldThrow <InvalidOperationException>("because the configuration is in use"); #endif }