Commits

P_W999  committed 5e6d46e

- fixed unit tests for ExifTool 9.28

  • Participants
  • Parent commits 3c50e33

Comments (0)

Files changed (1)

File test/be/pw/jexif/JExifToolTest.java

 		assertThat(iso).isEqualTo("1600");
 	}
 
-	@Test(groups = { "read-human", "simple", "error" }, suiteName = "simple", expectedExceptions = { IOException.class }, expectedExceptionsMessageRegExp = "There was a problem reading the file fail.jpg")
+	@Test(groups = { "read-human", "simple", "error" }, suiteName = "simple", expectedExceptions = { IOException.class }, expectedExceptionsMessageRegExp = "There was a problem reading the file .*fail.jpg")
 	public void testExifErrorOnFileNotFoundHumanReadable() throws Exception {
 		File nonExistingFile = new File("c:\\bla\\haha\\lol\\fail.jpg");
 		JExifInfo info = tool.getInfo(nonExistingFile);
 		info.getTagValue(ExifIFD.APERTUREVALUE);
 	}
 
-	@Test(groups = { "read-exact", "simple", "error" }, suiteName = "simple", expectedExceptions = { IOException.class }, expectedExceptionsMessageRegExp = "There was a problem reading the file fail.jpg")
+	@Test(groups = { "read-exact", "simple", "error" }, suiteName = "simple", expectedExceptions = { IOException.class }, expectedExceptionsMessageRegExp = "There was a problem reading the file .*fail.jpg")
 	public void testExifErrorOnFileNotFoundExact() throws Exception {
 		File nonExistingFile = new File("c:\\bla\\haha\\lol\\fail.jpg");
 		JExifInfo info = tool.getInfo(nonExistingFile);
 		assertThat(r.get("Brightness")).isNotNull().isNotEmpty().isEqualTo("0");
 		assertThat(r.get("LongExposureNoiseReduction")).isNotNull().isNotEmpty().isEqualTo("Off");
 		assertThat(r.get("HighISONoiseReduction")).isNotNull().isNotEmpty().isEqualTo("Normal");
-		assertThat(r.get("HDR")).isNotNull().isNotEmpty().isEqualTo("Off");
+		assertThat(r.get("HDR")).isNotNull().isNotEmpty().startsWith("Off");  //different version = different result
 		assertThat(r.get("FaceInfoOffset")).isNotNull().isNotEmpty().isEqualTo("94");
 		assertThat(r.get("SonyDateTime")).isNotNull().isNotEmpty().isEqualTo("2011:11:07 16:16:50");
 		assertThat(r.get("FacesDetected")).isNotNull().isNotEmpty().isEqualTo("0");
 		assertThat(r.get("FaceInfoLength")).isNotNull().isNotEmpty().isEqualTo("37");
-		assertThat(r.get("ColorReproduction")).isNotNull().isNotEmpty().isEqualTo("Standard");
+		//assertThat(r.get("ColorReproduction")).isNotNull().isNotEmpty().isEqualTo("Standard");  //verified manually, it's gone
 		assertThat(r.get("ColorTemperature")).isNotNull().isNotEmpty().isEqualTo("Auto");
 		assertThat(r.get("ColorCompensationFilter")).isNotNull().isNotEmpty().isEqualTo("0");
 		assertThat(r.get("SceneMode")).isNotNull().isNotEmpty().isEqualTo("Standard");
 		assertThat(r.get("VignettingCorrection")).isNotNull().isNotEmpty().isEqualTo("Auto");
 		assertThat(r.get("LateralChromaticAberration")).isNotNull().isNotEmpty().isEqualTo("Auto");
 		assertThat(r.get("DistortionCorrection")).isNotNull().isNotEmpty().isEqualTo("Off");
-		assertThat(r.get("LensType")).isNotNull().isNotEmpty().isEqualTo("E-Mount, T-Mount, Other Lens or no lens");
+		assertThat(r.get("LensType")).isNotNull().isNotEmpty().isEqualTo("Sony E 18-55mm F3.5-5.6 OSS");
 		assertThat(r.get("LensSpec")).isNotNull().isNotEmpty().isEqualTo("E 18-55mm F3.5-5.6 OSS");
 		assertThat(r.get("FlashLevel")).isNotNull().isNotEmpty().isEqualTo("Normal");
 		assertThat(r.get("ReleaseMode")).isNotNull().isNotEmpty().isEqualTo("Exposure Bracketing");
 		assertThat(r.get("YCbCrSubSampling")).isNotNull().isNotEmpty().isEqualTo("YCbCr4:4:4 (1 1)");
 		assertThat(r.get("Aperture")).isNotNull().isNotEmpty().isEqualTo("8.0");
 		assertThat(r.get("ImageSize")).isNotNull().isNotEmpty().isEqualTo("1024x683");
-		assertThat(r.get("LensID")).isNotNull().isNotEmpty().isEqualTo("E 18-55mm F3.5-5.6 OSS");
+		assertThat(r.get("LensID")).isNotNull().isNotEmpty().isEqualTo("Sony E 18-55mm F3.5-5.6 OSS");
 		assertThat(r.get("ScaleFactor35efl")).isNotNull().isNotEmpty().isEqualTo("1.5");
 		assertThat(r.get("ShutterSpeed")).isNotNull().isNotEmpty().isEqualTo("1/400");
 		assertThat(r.get("ThumbnailImage")).isNotNull().isNotEmpty().isEqualTo("(Binary data 11489 bytes, use -b option to extract)");
 		assertThat(r.get("ExifToolVersion")).isNotNull().isNotEmpty();
 		assertThat(r.get("FileName")).isNotNull().isNotEmpty().isEqualTo("read04.JPG");
 		// assertThat(r.get("Directory")).isNotNull().isNotEmpty().isEqualTo(".");
-		assertThat(r.get("FileSize")).isNotNull().isNotEmpty().isEqualTo("245853");
+		//assertThat(r.get("FileSize")).isNotNull().isNotEmpty().isEqualTo("245853");
 		// assertThat(r.get("FileModifyDate")).isNotNull().isNotEmpty().isEqualTo("2012:05:13 14:09:04+02:00");
 		// assertThat(r.get("FilePermissions")).isNotNull().isNotEmpty().isEqualTo("444");
 		assertThat(r.get("FileType")).isNotNull().isNotEmpty().isEqualTo("JPEG");
 		assertThat(r.get("MonochromeToning")).isNotNull().isNotEmpty().isEqualTo("65535");
 		assertThat(r.get("FaceDetect")).isNotNull().isNotEmpty().isEqualTo("0 0");
 		assertThat(r.get("FaceDetectFrameSize")).isNotNull().isNotEmpty().isEqualTo("720 478");
-		assertThat(r.get("ShadowCompensation")).isNotNull().isNotEmpty().isEqualTo("2 4");
+		//assertThat(r.get("ShadowCompensation")).isNotNull().isNotEmpty().isEqualTo("2 4");  //verified: it's gone
 		assertThat(r.get("CrossProcess")).isNotNull().isNotEmpty().isEqualTo("0");
 		assertThat(r.get("DistortionCorrection")).isNotNull().isNotEmpty().isEqualTo("0");
 		assertThat(r.get("ChromaticAberrationCorrection")).isNotNull().isNotEmpty().isEqualTo("1");
 		assertThat(r.get("AFIntegrationTime")).isNotNull().isNotEmpty().isEqualTo("0");
 		assertThat(r.get("AFPointsInFocus")).isNotNull().isNotEmpty().isEqualTo("0");
 		assertThat(r.get("WBShiftAB")).isNotNull().isNotEmpty().isEqualTo("0");
-		assertThat(r.get("WBShiftMG")).isNotNull().isNotEmpty().isEqualTo("0");
+		//assertThat(r.get("WBShiftMG")).isNotNull().isNotEmpty().isEqualTo("0");
 		assertThat(r.get("SerialNumber")).isNotNull().isNotEmpty().isEqualTo("4285431");
 		assertThat(r.get("SourceDirectoryIndex")).isNotNull().isNotEmpty().isEqualTo("0");
 		assertThat(r.get("SourceFileIndex")).isNotNull().isNotEmpty().isEqualTo("0");