コード例 #1
0
  @Override
  public void tearDown() throws Exception {
    super.tearDown();

    playerDAO.close();
    SQLiteHelper sqLiteHelper = new SQLiteHelper(context);
    sqLiteHelper.truncateTables();
    sqLiteHelper.close();
  }
コード例 #2
0
  @Override
  public void setUp() throws Exception {
    super.setUp();

    playerDAO = new PlayerDAO(context);
    playerDAO.open();

    // add team to db
    team = DatabaseUtil.addTeamToDatabase(context, "Test Team");

    player = new Player();
    player.setName("Test Person");
    player.setTeam(team);
  }