public void CanEnsureIndexOnMultipleKeysOfDifferentTypes() { // Arrange. OrmongoConfiguration.AutoCreateIndexes = true; // Act. BlogPost.EnsureIndex(bp => bp.Text, bp => bp.DatePublished); // Assert. Assert.That(BlogPost.GetCollection().IndexExistsByName("Text_1_DatePublished_1"), Is.True); }
public void CanEnsureIndexOnSingleKey() { // Arrange. OrmongoConfiguration.AutoCreateIndexes = true; // Act. BlogPost.EnsureIndex(bp => bp.Text); // Assert. Assert.That(BlogPost.GetCollection().IndexExistsByName("Text_1"), Is.True); }