public void CreateCreatesDatabase()
    {
      var manager = new RavenDbManager {Description = new DbDescription {ConnectionInfo = GlobalTest.DbManager1.Description.ConnectionInfo}};

      manager.Create();

      var server = manager.CreateServer();
      Assert.IsTrue(server.DatabaseExists(manager.Description.ConnectionInfo.DatabaseName));
    }
    public void CreateWithLiteralSchemaCreatesSchema()
    {
      var manager = new RavenDbManager
                      {
                        Description = new DbDescription
                                        {
                                          ConnectionInfo = GlobalTest.DbManager1.Description.ConnectionInfo,
                                          Schemas = new List<DbScript> {new DbScript {ScriptType = ScriptType.Literal, ScriptValue = LiteralSchema}}
                                        }
                      };

      manager.Create();

      var db = manager.CreateDatabase();

      var result = db.GetCollectionNames().FirstOrDefault(c => c == "c1");
      Assert.IsNotNull(result);
    }
    public void SeedFromLiteralSeedsDatabase()
    {
      var manager = new RavenDbManager
                    {
                      Description = new DbDescription
                                    {
                                      ConnectionInfo = GlobalTest.DbManager1.Description.ConnectionInfo,
                                      Schemas = new List<DbScript> {new DbScript {ScriptType = ScriptType.Literal, ScriptValue = LiteralSchema}},
                                      Seeds = new List<DbScript> {new DbScript {ScriptType = ScriptType.Literal, ScriptValue = LiteralSeed}}
                                    }
                    };

      manager.Create();
      manager.Seed();

      var db = manager.CreateDatabase();

      Assert.That(db["c1"].Count(), Is.EqualTo(2));
      Assert.That(db["c2"].Count(), Is.EqualTo(1));
    }