@Test public void testGetHintsDll() throws IOException { File file = getResourceFile(DLL_FILE); DependencyHintsInfo dependencyHintsInfo = HintUtils.getHints(file.getPath()); Assert.assertNotNull(dependencyHintsInfo); Assert.assertEquals("Microsoft Corporation", dependencyHintsInfo.getCompanyName()); Assert.assertEquals("6.1.40302.0", dependencyHintsInfo.getFileVersion()); Assert.assertEquals("© Microsoft Corporation. All rights reserved.", dependencyHintsInfo.getCopyright()); Assert.assertEquals("EntityFramework.SqlServer.dll", dependencyHintsInfo.getOriginalFilename()); Assert.assertEquals("Microsoft Entity Framework", dependencyHintsInfo.getProductName()); Assert.assertEquals("6.1.3-40302", dependencyHintsInfo.getProductVersion()); if (Platform.isWindows()) { Assert.assertEquals("Microsoft Code Signing PCA", dependencyHintsInfo.getIssuerCommonName()); Assert.assertEquals("Microsoft Corporation", dependencyHintsInfo.getSubjectCommonName()); } else { Assert.assertNull(dependencyHintsInfo.getIssuerCommonName()); Assert.assertNull(dependencyHintsInfo.getSubjectCommonName()); } }
public static DependencyHintsInfo getHints(String filename) { DependencyHintsInfo hints = null; if (StringUtils.isNotBlank(filename)) { if (filename.matches(PORTABLE_EXECUTABLES_PATTERN)) { hints = getPortableExecutableHints(filename); } } return hints; }
HintUtils { public static DependencyHintsInfo getHints(String filename) { DependencyHintsInfo hints = null; if (StringUtils.isNotBlank(filename)) { if (filename.matches(PORTABLE_EXECUTABLES_PATTERN)) { hints = getPortableExecutableHints(filename); } } return hints; } }
HintUtils { public static DependencyHintsInfo getHints(String filename) { DependencyHintsInfo hints = null; if (StringUtils.isNotBlank(filename)) { if (filename.matches(PORTABLE_EXECUTABLES_PATTERN)) { hints = getPortableExecutableHints(filename); } } return hints; } private  HintUtils(); }
HintUtils { public static DependencyHintsInfo getHints(String filename) { DependencyHintsInfo hints = null; if (StringUtils.isNotBlank(filename)) { if (filename.matches(PORTABLE_EXECUTABLES_PATTERN)) { hints = getPortableExecutableHints(filename); } } return hints; } private  HintUtils(); static DependencyHintsInfo getHints(String filename); }
HintUtils { public static DependencyHintsInfo getHints(String filename) { DependencyHintsInfo hints = null; if (StringUtils.isNotBlank(filename)) { if (filename.matches(PORTABLE_EXECUTABLES_PATTERN)) { hints = getPortableExecutableHints(filename); } } return hints; } private  HintUtils(); static DependencyHintsInfo getHints(String filename);  }