예제 #1
0
  @Test
  public void testPlatforms() {
    try {
      // get row count of experiments in the dataset
      int expected = getDataSet().getTable("Platform").getRowCount();

      // get number of experiments from the DAO
      int actual = getPlatformDAO().count();

      // test data contains 2 experiments, check size of returned list
      TestCase.assertEquals("Wrong number of Platform", expected, actual);
      System.out.println("Expected number of Platform: " + expected + ", actual: " + actual);

      for (Platform d : random(getPlatformDAO(), actual, 5)) {
        TestCase.assertNotNull(d);
        TestCase.assertNotNull(d.getPlatformId());
      }
    } catch (Exception e) {
      e.printStackTrace();
      TestCase.fail();
    }
  }