Header { public String getSensorType() { return headerParser.getString(EnviConstants.HEADER_KEY_SENSOR_TYPE, UNKNOWN_SENSOR_TYPE); } Header(final BufferedReader reader); ByteOrder getJavaByteOrder(); String getFileType(); int getNumSamples(); int getNumLines(); int getNumBands(); int getHeaderOffset(); int getDataType(); String getInterleave(); String getSensorType(); int getByteOrder(); EnviMapInfo getMapInfo(); EnviProjectionInfo getProjectionInfo(); String[] getBandNames(); String getDescription(); BeamProperties getBeamProperties(); String[] getWavelengths(); String[] getFWHM(); String getWavelengthsUnit(); double[] getDataOffsetValues(); double[] getDataGainValues(); Double getDataIgnoreValue(); int getNumClasses(); String[] getClassNmaes(); int[] getClassColorRGB(); static Properties loadProperties(String text); MetadataElement getAsMetadata();  }
@Test public void testParseSensorType() throws IOException { final String sensorType = "blaberzupp"; final String line = "sensor type = " + sensorType + "\n"; final BufferedReader in = createReader(createMandatoryHeader() + line); final Header header = new Header(in); assertEquals(sensorType, header.getSensorType()); }
@Test public void testParseSensorType_NoSensorTypeDefined() throws IOException { String mandatoryHeader = createMandatoryHeader(); final BufferedReader in = createReader(mandatoryHeader); final Header header = new Header(in); assertEquals(Header.UNKNOWN_SENSOR_TYPE, header.getSensorType()); }