Exemplo n.º 1
0
  @BeforeClass
  public static void before() throws UnknownHostException, MongoException {
    connector = new MongoConnector("localhost", 27017);
    dao = connector.getDao(DB_NAME);
    DB db = connector.getMongo().getDB(DB_NAME);
    coll = db.getCollection("student");

    dao.create(Student.class, true);
    dao.save(new Student());

    System.out.println("预热完成开始测试...");
  }
Exemplo n.º 2
0
 @AfterClass
 public static void after() {
   dao.cleanCursors();
   connector.close();
 }