/** * Retrieves whether the product must be flipped top down or not * * @param prodType * @return <code>true</code> if the product must be flipped top down, otherwise <code>false</code>. */ public boolean mustFlip(final String prodType) { boolean bRet = false; try { final ModisProductDescription prod = getProductDescription(prodType); bRet = prod.mustFlipTopDown(); } catch (IOException e) { logger.severe("Unable to retrieve flipping information for product type '" + prodType + "'."); } return bRet; }
/** * Tests the correct functionality of the flip accessor methods */ @Test public void testFlipAccessors() { // initially false assertEquals(false, prod.mustFlipTopDown()); // set true and check prod.setTopDownFlip(true); assertEquals(true, prod.mustFlipTopDown()); // set false and check again prod.setTopDownFlip(false); assertEquals(false, prod.mustFlipTopDown()); }
@Test public void testDefaultConstruction() { assertEquals(0, prod.getBandNames().length); assertNull(prod.getBandDescription("no_band")); assertEquals(false, prod.mustFlipTopDown()); assertArrayEquals(null, prod.getGeolocationDatasetNames()); assertEquals(null, prod.getExternalGeolocationPattern()); assertEquals(false, prod.hasExternalGeolocation()); assertEquals(0, prod.getTiePointNames().length); }