public async Task Setup() { await Connection.CreateDatabase(TestDatabaseGeneral); _db = Connection.GetDatabase(TestDatabaseGeneral); await _db.CreateCollection(TestDocumentCollectionName) .Type(ACollectionType.Document) .Create(); }
public async Task Should_create_document_collection() { var createResult = await _db.CreateCollection(TestDocumentCollectionName).Create(); Assert.AreEqual(200, createResult.StatusCode); Assert.IsTrue(createResult.Success); Assert.IsTrue(createResult.HasValue); Assert.IsNotEmpty((string)createResult.Value["id"]); Assert.AreEqual(TestDocumentCollectionName, createResult.Value["name"]); Assert.AreEqual(false, createResult.Value["waitForSync"]); //Assert.AreEqual(false, createResult.Value["isVolatile")); Assert.AreEqual(false, createResult.Value["isSystem"]); Assert.AreEqual((int)ACollectionStatus.Loaded, createResult.Value["status"]); Assert.AreEqual((int)ACollectionType.Document, createResult.Value["type"]); }