@Before public void setUp() throws Exception { Runner.initLogger(); myTempDirFixture = IdeaTestFixtureFactory.getFixtureFactory().createTempDirTestFixture(); myTempDirFixture.setUp(); FileUtil.copyDir(PathManagerEx.findFileUnderCommunityHome("updater/testData"), getDataDir()); boolean windowsLineEnds = new File(getDataDir(), "Readme.txt").length() == 7132; CHECKSUMS = new CheckSums(windowsLineEnds); }
@Test public void testBasics() throws Exception { Map<String, Long> checkSums = Digester.digestFiles(getDataDir(), Collections.<String>emptyList(), TEST_UI); assertEquals(12, checkSums.size()); assertEquals(CHECKSUMS.README_TXT, (long) checkSums.get("Readme.txt")); assertEquals(CHECKSUMS.FOCUSKILLER_DLL, (long) checkSums.get("bin/focuskiller.dll")); assertEquals(CHECKSUMS.BOOTSTRAP_JAR, (long) checkSums.get("lib/bootstrap.jar")); Runner.initLogger(System.getProperty("java.io.tmpdir")); }