Add DashDownloadActionTest

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169522830
This commit is contained in:
eguven 2017-09-21 03:42:48 -07:00 committed by Oliver Woodman
parent ce7aaab3c6
commit d71400d280
2 changed files with 28 additions and 0 deletions

View file

@ -39,6 +39,11 @@ dependencies {
androidTestCompile 'com.google.dexmaker:dexmaker:' + dexmakerVersion
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:' + dexmakerVersion
androidTestCompile 'org.mockito:mockito-core:' + mockitoVersion
testCompile project(modulePrefix + 'testutils')
testCompile 'com.google.truth:truth:' + truthVersion
testCompile 'junit:junit:' + junitVersion
testCompile 'org.mockito:mockito-core:' + mockitoVersion
testCompile 'org.robolectric:robolectric:' + robolectricVersion
}
ext {

View file

@ -80,4 +80,27 @@ public final class RepresentationKey implements Parcelable, Comparable<Represent
return result;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RepresentationKey that = (RepresentationKey) o;
return periodIndex == that.periodIndex
&& adaptationSetIndex == that.adaptationSetIndex
&& representationIndex == that.representationIndex;
}
@Override
public int hashCode() {
int result = periodIndex;
result = 31 * result + adaptationSetIndex;
result = 31 * result + representationIndex;
return result;
}
}