@Override public Optional<String> cacheLocation() { return this.child.cacheLocation(); }
private boolean cacheLocationOptionExists(final ClassPathRoot a) { return a.cacheLocation().isPresent(); }
@Override public boolean test(final ClassPathRoot a) { return a.cacheLocation().isPresent() && isADependencyPath(a.cacheLocation().get()); }
private Boolean cacheLocationMatchesFilter(final ClassPathRoot classPathRoot) { final String cacheLocationValue = classPathRoot.cacheLocation().get(); return this.stringFilter.test(cacheLocationValue); }
@Override public Optional<String> cacheLocation() { StringBuilder classpath = new StringBuilder(); for (final ClassPathRoot each : this.roots) { final Optional<String> additional = each.cacheLocation(); if (additional.isPresent()) { classpath = classpath.append(File.pathSeparator + additional.get()); } } return Optional.ofNullable(classpath.toString()); }
@Override public boolean test(final ClassPathRoot a) { return a.cacheLocation().isPresent() && !isATestPath(a.cacheLocation().get()) && !isADependencyPath(a.cacheLocation().get()); }
private Predicate<ClassPathRoot> rootIsEqualTo(final String value) { return a -> a.cacheLocation().get().equals(value); }
@Before public void setUp() { MockitoAnnotations.initMocks(this); this.testee = new ClassPath(this.firstComponent, this.secondComponent); when(this.firstComponent.cacheLocation()).thenReturn(Optional.ofNullable("foo")); when(this.firstComponent.classNames()).thenReturn( Collections.singletonList("FooClass")); when(this.secondComponent.cacheLocation()).thenReturn(Optional.ofNullable("bar")); when(this.secondComponent.classNames()).thenReturn( Collections.singletonList("BarClass")); }
@Override public Optional<String> cacheLocation() { return this.child.cacheLocation(); }
@Override public Optional<String> cacheLocation() { StringBuilder classpath = new StringBuilder(); for (final ClassPathRoot each : this.roots) { final Optional<String> additional = each.cacheLocation(); if (additional.isPresent()) { classpath = classpath.append(File.pathSeparator + additional.get()); } } return Optional.ofNullable(classpath.toString()); }