use of org.fagu.fmv.soft.find.SoftFound in project fmv by f-agu.
the class MediaInfoProviderTestCase method assertInfo.
/**
* @param parser
* @param expectedVersion
* @throws IOException
*/
private void assertInfo(Parser parser, Version expectedVersion) throws IOException {
SoftFound softFound = parser.closeAndParse("", 0);
VersionSoftInfo softInfo = (VersionSoftInfo) softFound.getSoftInfo();
assertEquals(expectedVersion, softInfo.getVersion().orElse(null));
}
use of org.fagu.fmv.soft.find.SoftFound in project fmv by f-agu.
the class FFInfoTestCase method assertFull.
/**
* @param parser
* @param version
* @param builtDate
* @param builtVersion
* @throws IOException
* @throws ParseException
*/
private void assertFull(Parser parser, Version version, Date builtDate, Integer builtVersion) throws IOException, ParseException {
SoftFound softFound = parser.closeAndParse("", 0);
FFInfo ffInfo = (FFInfo) softFound.getSoftInfo();
if (version == null) {
assertNull(ffInfo.getVersion());
} else {
assertTrue(Objects.equals(version, ffInfo.getVersion()));
}
if (builtVersion == null) {
assertNull(ffInfo.getBuiltVersion());
} else {
assertTrue(Objects.equals(builtVersion, ffInfo.getBuiltVersion()));
}
if (builtDate == null) {
assertNull(ffInfo.getBuiltDate());
} else {
assertNotNull(ffInfo.getBuiltDate());
assertEquals(builtDate.getTime() / 1000, ffInfo.getBuiltDate().getTime() / 1000);
}
}
Aggregations