aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Decker <cgdecker@gmail.com>2017-11-27 15:59:17 -0500
committerGitHub <noreply@github.com>2017-11-27 15:59:17 -0500
commit2aa8ae4f8f150756b00f782c21f0214a50ce2112 (patch)
tree727f8845c077c191c9409b76e985dc26ec4a991c
parent7e5b6fe2a0b7ef8cb1ff59b9f43cdbc54c5c59e9 (diff)
parent462d51ad47bafcf55e65e5fe10517245ba1e2636 (diff)
downloadjimfs-2aa8ae4f8f150756b00f782c21f0214a50ce2112.tar.gz
Merge pull request #57 from google/sync-master-2017/11/15
Moe sync
-rw-r--r--jimfs/src/test/java/com/google/common/jimfs/PathSubject.java23
-rw-r--r--pom.xml4
2 files changed, 11 insertions, 16 deletions
diff --git a/jimfs/src/test/java/com/google/common/jimfs/PathSubject.java b/jimfs/src/test/java/com/google/common/jimfs/PathSubject.java
index c5387a1..5eb1c0b 100644
--- a/jimfs/src/test/java/com/google/common/jimfs/PathSubject.java
+++ b/jimfs/src/test/java/com/google/common/jimfs/PathSubject.java
@@ -21,10 +21,8 @@ import static java.nio.charset.StandardCharsets.UTF_8;
import com.google.common.collect.ImmutableList;
import com.google.common.io.BaseEncoding;
-import com.google.common.truth.FailureStrategy;
+import com.google.common.truth.FailureMetadata;
import com.google.common.truth.Subject;
-import com.google.common.truth.SubjectFactory;
-
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.DirectoryStream;
@@ -36,7 +34,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
-
import javax.annotation.Nullable;
/**
@@ -46,10 +43,8 @@ import javax.annotation.Nullable;
*/
public final class PathSubject extends Subject<PathSubject, Path> {
- /**
- * Returns the subject factory for doing assertions on paths.
- */
- public static SubjectFactory<PathSubject, Path> paths() {
+ /** Returns the subject factory for doing assertions on paths. */
+ public static Subject.Factory<PathSubject, Path> paths() {
return new PathSubjectFactory();
}
@@ -59,8 +54,8 @@ public final class PathSubject extends Subject<PathSubject, Path> {
protected LinkOption[] linkOptions = FOLLOW_LINKS;
private Charset charset = UTF_8;
- private PathSubject(FailureStrategy failureStrategy, Path subject) {
- super(failureStrategy, subject);
+ private PathSubject(FailureMetadata failureMetadata, Path subject) {
+ super(failureMetadata, subject);
}
private Path toPath(String path) {
@@ -79,7 +74,7 @@ public final class PathSubject extends Subject<PathSubject, Path> {
*/
// TODO(cgruber): Talk to cdecker about removing this as an anti-pattern.
public PathSubject andThat(String path, LinkOption... linkOptions) {
- PathSubject newSubject = new PathSubject(failureStrategy, toPath(path));
+ PathSubject newSubject = check().about(paths()).that(toPath(path));
if (linkOptions.length != 0) {
newSubject = newSubject.noFollowLinks();
}
@@ -445,11 +440,11 @@ public final class PathSubject extends Subject<PathSubject, Path> {
};
}
- private static class PathSubjectFactory extends SubjectFactory<PathSubject, Path> {
+ private static class PathSubjectFactory implements Subject.Factory<PathSubject, Path> {
@Override
- public PathSubject getSubject(FailureStrategy fs, Path that) {
- return new PathSubject(fs, that);
+ public PathSubject createSubject(FailureMetadata failureMetadata, Path that) {
+ return new PathSubject(failureMetadata, that);
}
}
diff --git a/pom.xml b/pom.xml
index 9d4d14d..a66c1c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,7 +91,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.7</java.version>
- <guava.version>19.0</guava.version>
+ <guava.version>23.4-android</guava.version>
<gpg.skip>true</gpg.skip>
</properties>
@@ -139,7 +139,7 @@
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
- <version>0.28</version>
+ <version>0.36</version>
<scope>test</scope>
</dependency>
</dependencies>