コード例 #1
0
  /** Test an incomplete report. */
  @Test
  public void testIncompleteReport() {
    System.out.println(
        "Running test "
            + this.getClass().getSimpleName()
            + "."
            + new Object() {}.getClass().getEnclosingMethod().getName());

    String[] metaData = reports.get(7).getMetaData();

    assertEquals("11/06/2015", metaData[ExtMetaDataCols.DATE_NAME.ordinal()]);
    assertEquals("", metaData[ExtMetaDataCols.TEMPERATURE_NAME.ordinal()]);
    assertEquals("5 - Clear", metaData[ExtMetaDataCols.TRANSPARENCY_NAME.ordinal()]);
    assertEquals("", metaData[ExtMetaDataCols.TELESCOPES_NAME.ordinal()]);
  }
コード例 #2
0
  /** Test misspelling in report meta data. */
  @Test
  public void testMispeltTransparency() {
    System.out.println(
        "Running test "
            + this.getClass().getSimpleName()
            + "."
            + new Object() {}.getClass().getEnclosingMethod().getName());

    String[] metaData = reports.get(4).getMetaData();
    String[] targetEntry = reports.get(4).getData(0);

    assertEquals("04/06/2015", metaData[ExtMetaDataCols.DATE_NAME.ordinal()]);
    assertEquals("12C (wind: 0km/h)", metaData[ExtMetaDataCols.TEMPERATURE_NAME.ordinal()]);
    assertEquals("", metaData[ExtMetaDataCols.TRANSPARENCY_NAME.ordinal()]);

    assertEquals("Jupiter", targetEntry[ExtDataCols.TARGET_NAME.ordinal()]);
    assertEquals("Planet", targetEntry[ExtDataCols.TYPE_NAME.ordinal()]);
  }
コード例 #3
0
  /** Test a report meta information. */
  @Test
  public void testReport1() {
    System.out.println(
        "Running test "
            + this.getClass().getSimpleName()
            + "."
            + new Object() {}.getClass().getEnclosingMethod().getName());

    String[] metaData = reports.get(1).getMetaData();

    assertEquals("22/03/2015", metaData[ExtMetaDataCols.DATE_NAME.ordinal()]);
    assertEquals("19:00-22:00", metaData[ExtMetaDataCols.TIME_NAME.ordinal()]);
    assertEquals("Cambridge, UK", metaData[ExtMetaDataCols.LOCATION_NAME.ordinal()]);
    assertEquals("12m", metaData[ExtMetaDataCols.ALTITUDE_NAME.ordinal()]);
    assertEquals("3C (no wind)", metaData[ExtMetaDataCols.TEMPERATURE_NAME.ordinal()]);
    assertEquals("2 - Slight undulations", metaData[ExtMetaDataCols.SEEING_NAME.ordinal()]);
    assertEquals("3 - Somewhat clear", metaData[ExtMetaDataCols.TRANSPARENCY_NAME.ordinal()]);
    assertEquals("20.4 mag", metaData[ExtMetaDataCols.DARKNESS_NAME.ordinal()]);
    assertEquals("Tele Vue 60 F6", metaData[ExtMetaDataCols.TELESCOPES_NAME.ordinal()]);
    assertEquals(
        "TV Panoptic 24mm, Nagler 7mm, Powermate 2.5x",
        metaData[ExtMetaDataCols.EYEPIECES_NAME.ordinal()]);
    assertEquals("Astronomik OIII", metaData[ExtMetaDataCols.FILTERS_NAME.ordinal()]);
  }