use of org.fagu.version.Version in project fmv by f-agu.
the class MediaInfoProviderTestCase method testParse.
@Test
public void testParse() throws IOException {
Parser parser = newParser();
parser.readLine("MediaInfo Command line,");
parser.readLine("MediaInfoLib - v18.03.1");
assertInfo(parser, new Version(18, 3, 1));
}
use of org.fagu.version.Version in project fmv by f-agu.
the class PdfInfoSoftProviderTestCase method testParseOnLinux_original.
/**
* @throws IOException
*/
@Test
public void testParseOnLinux_original() throws IOException {
Parser parser = newParser();
parser.readLine("pdfinfo version 3.04");
parser.readLine("Copyright 1996-2014 Glyph & Cog, LLC");
assertInfo(parser, new Version(3, 4));
}
use of org.fagu.version.Version in project fmv by f-agu.
the class PdfInfoSoftProviderTestCase method testParseOnWindows_original.
/**
* @throws IOException
*/
@Test
public void testParseOnWindows_original() throws IOException {
Parser parser = newParser();
parser.readLine("pdfinfo version 3.04");
parser.readLine("Copyright 1996-2014 Glyph & Cog, LLC");
assertInfo(parser, new Version(3, 4));
}
use of org.fagu.version.Version in project fmv by f-agu.
the class SoftTestCase method testGS.
@Test
@Ignore
public void testGS() throws Exception {
GSSoftProvider gsSoftProvider = new GSSoftProvider();
Soft soft = gsSoftProvider.searchConfigurable(ss -> {
ss.withPolicy(new VersionSoftPolicy().onAllPlatforms(maxVersion(new Version(8))));
});
soft.getFounds().forEach(sf -> {
System.out.println(sf.getFoundReason() + " " + sf.getFile() + " " + sf.getReason());
});
SoftLogger softLogger = new SoftLogger(Collections.singletonList(soft));
softLogger.log(System.out::println);
// System.out.println(soft);
}
use of org.fagu.version.Version in project fmv by f-agu.
the class AutoRotate method isAutoRotateObsolete.
/**
* @param soft
* @return
*/
public static boolean isAutoRotateObsolete(Soft soft) {
SoftFound softFound = soft.getFirstFound();
FFInfo ffInfo = (FFInfo) softFound.getSoftInfo();
// version
Version version = ffInfo.getVersion();
if (version != null) {
return version.isUpperOrEqualsThan(new Version(2, 7));
}
// build number
Integer builtVersion = ffInfo.getBuiltVersion();
if (builtVersion != null) {
return builtVersion.intValue() > 73010;
}
// build date
Date builtDate = ffInfo.getBuiltDate();
if (builtDate != null) {
@SuppressWarnings("deprecation") Date minDate = new Date(2015 - 1900, 6 - 1, 12);
return minDate.before(builtDate);
}
return false;
}
Aggregations