public void assertStartsWithRaw(final AssertionInfo info, final Path actual, final Path other) { assertNotNull(info, actual); assertExpectedStartPathIsNotNull(other); if (!actual.startsWith(other)) throw failures.failure(info, shouldStartWith(actual, other)); }
public void assertStartsWithRaw(final AssertionInfo info, final Path actual, final Path other) { assertNotNull(info, actual); assertExpectedStartPathIsNotNull(other); if (!actual.startsWith(other)) throw failures.failure(info, shouldStartWith(actual, other)); }
public void assertStartsWith(final AssertionInfo info, final Path actual, final Path start) { assertNotNull(info, actual); assertExpectedStartPathIsNotNull(start); final Path canonicalActual; try { canonicalActual = actual.toRealPath(); } catch (IOException e) { throw new PathsException(FAILED_TO_RESOLVE_ACTUAL_REAL_PATH, e); } final Path canonicalOther; try { canonicalOther = start.toRealPath(); } catch (IOException e) { throw new PathsException(FAILED_TO_RESOLVE_ARGUMENT_REAL_PATH, e); } if (!canonicalActual.startsWith(canonicalOther)) throw failures.failure(info, shouldStartWith(actual, start)); }
public void assertStartsWith(final AssertionInfo info, final Path actual, final Path start) { assertNotNull(info, actual); assertExpectedStartPathIsNotNull(start); final Path canonicalActual; try { canonicalActual = actual.toRealPath(); } catch (IOException e) { throw new PathsException(FAILED_TO_RESOLVE_ACTUAL_REAL_PATH, e); } final Path canonicalOther; try { canonicalOther = start.toRealPath(); } catch (IOException e) { throw new PathsException(FAILED_TO_RESOLVE_ARGUMENT_REAL_PATH, e); } if (!canonicalActual.startsWith(canonicalOther)) throw failures.failure(info, shouldStartWith(actual, start)); }