Merge "Update SettingsRoboTests for truth 0.42"
This commit is contained in:
@@ -23,8 +23,8 @@ import static org.robolectric.RuntimeEnvironment.application;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.google.common.truth.ComparableSubject;
|
import com.google.common.truth.ComparableSubject;
|
||||||
import com.google.common.truth.FailureStrategy;
|
import com.google.common.truth.FailureMetadata;
|
||||||
import com.google.common.truth.SubjectFactory;
|
import com.google.common.truth.Subject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom subject for use with {@link com.google.common.truth.Truth}, to provide a more readable
|
* Custom subject for use with {@link com.google.common.truth.Truth}, to provide a more readable
|
||||||
@@ -38,12 +38,12 @@ import com.google.common.truth.SubjectFactory;
|
|||||||
*/
|
*/
|
||||||
public class ResIdSubject extends ComparableSubject<ResIdSubject, Integer> {
|
public class ResIdSubject extends ComparableSubject<ResIdSubject, Integer> {
|
||||||
|
|
||||||
public static final SubjectFactory<ResIdSubject, Integer> FACTORY =
|
public static final Subject.Factory<ResIdSubject, Integer> FACTORY =
|
||||||
new SubjectFactory<ResIdSubject, Integer>() {
|
new Subject.Factory<ResIdSubject, Integer>() {
|
||||||
@Override
|
@Override
|
||||||
public ResIdSubject getSubject(
|
public ResIdSubject createSubject(
|
||||||
FailureStrategy failureStrategy, Integer integer) {
|
FailureMetadata failureMetadata, Integer integer) {
|
||||||
return new ResIdSubject(failureStrategy, integer);
|
return new ResIdSubject(failureMetadata, integer);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -52,9 +52,9 @@ public class ResIdSubject extends ComparableSubject<ResIdSubject, Integer> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ResIdSubject(
|
public ResIdSubject(
|
||||||
FailureStrategy failureStrategy,
|
FailureMetadata failureMetadata,
|
||||||
@Nullable Integer integer) {
|
@Nullable Integer integer) {
|
||||||
super(failureStrategy, integer);
|
super(failureMetadata, integer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void isEqualTo(int other) {
|
public void isEqualTo(int other) {
|
||||||
@@ -65,7 +65,7 @@ public class ResIdSubject extends ComparableSubject<ResIdSubject, Integer> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getDisplaySubject() {
|
protected String actualCustomStringRepresentation() {
|
||||||
String resourceName = "<" + resIdToString(getSubject()) + ">";
|
String resourceName = "<" + resIdToString(getSubject()) + ">";
|
||||||
String customName = internalCustomName();
|
String customName = internalCustomName();
|
||||||
if (customName != null) {
|
if (customName != null) {
|
||||||
|
Reference in New Issue
Block a user