private void assertGarbageFilesAllDeleted() throws Exception { assertThat(getCleanFile("g1")).doesNotExist(); assertThat(getCleanFile("g2")).doesNotExist(); assertThat(new File(mCacheDir, "otherFile0.tmp")).doesNotExist(); assertThat(new File(mCacheDir, "otherFile1.clean")).doesNotExist(); }
private void assertGarbageFilesAllDeleted() throws Exception { assertThat(getCleanFile("g1", 0)).doesNotExist(); assertThat(getCleanFile("g1", 1)).doesNotExist(); assertThat(getCleanFile("g2", 0)).doesNotExist(); assertThat(getCleanFile("g2", 1)).doesNotExist(); assertThat(new File(cacheDir, "otherFile0")).doesNotExist(); assertThat(new File(cacheDir, "dir1")).doesNotExist(); }
private void assertAbsent(String key) throws Exception { DiskLruCache.Value value = cache.get(key); if (value != null) { Assert.fail(); } assertThat(getCleanFile(key, 0)).doesNotExist(); assertThat(getCleanFile(key, 1)).doesNotExist(); assertThat(getDirtyFile(key, 0)).doesNotExist(); assertThat(getDirtyFile(key, 1)).doesNotExist(); }
private void assertAbsent(IgDiskCache cache, String key) throws Exception { OptionalStream<SnapshotInputStream> in = cache.get(key); if (in.isPresent()) { in.get().close(); fail(); } assertThat(getCleanFile(key)).doesNotExist(); assertThat(getDirtyFile(key)).doesNotExist(); }