use of android.content.pm.VerificationParams in project android_frameworks_base by DirtyUnicorns.
the class VerificationParamsTest method testParcel.
public void testParcel() throws Exception {
VerificationParams expected = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID);
Parcel parcel = Parcel.obtain();
expected.writeToParcel(parcel, 0);
parcel.setDataPosition(0);
VerificationParams actual = VerificationParams.CREATOR.createFromParcel(parcel);
assertEquals(VERIFICATION_URI, actual.getVerificationURI());
assertEquals(ORIGINATING_URI, actual.getOriginatingURI());
assertEquals(REFERRER, actual.getReferrer());
assertEquals(ORIGINATING_UID, actual.getOriginatingUid());
}
use of android.content.pm.VerificationParams in project android_frameworks_base by DirtyUnicorns.
the class VerificationParamsTest method testEquals_OriginatingUri_Failure.
public void testEquals_OriginatingUri_Failure() throws Exception {
VerificationParams params1 = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID);
VerificationParams params2 = new VerificationParams(Uri.parse(VERIFICATION_URI_STRING), Uri.parse("http://a.different.uri/"), Uri.parse(REFERRER_STRING), ORIGINATING_UID);
assertFalse(params1.equals(params2));
}
use of android.content.pm.VerificationParams in project android_frameworks_base by DirtyUnicorns.
the class VerificationParamsTest method testEquals_VerificationUri_Failure.
public void testEquals_VerificationUri_Failure() throws Exception {
VerificationParams params1 = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID);
VerificationParams params2 = new VerificationParams(Uri.parse("http://a.different.uri/"), Uri.parse(ORIGINATING_URI_STRING), Uri.parse(REFERRER_STRING), ORIGINATING_UID);
assertFalse(params1.equals(params2));
}
use of android.content.pm.VerificationParams in project android_frameworks_base by ResurrectionRemix.
the class VerificationParamsTest method testHashCode_Referrer_Failure.
public void testHashCode_Referrer_Failure() throws Exception {
VerificationParams params1 = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID);
VerificationParams params2 = new VerificationParams(Uri.parse(VERIFICATION_URI_STRING), Uri.parse(ORIGINATING_URI_STRING), null, ORIGINATING_UID);
assertFalse(params1.hashCode() == params2.hashCode());
}
use of android.content.pm.VerificationParams in project android_frameworks_base by ResurrectionRemix.
the class VerificationParamsTest method testEquals_Referrer_Failure.
public void testEquals_Referrer_Failure() throws Exception {
VerificationParams params1 = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID);
VerificationParams params2 = new VerificationParams(Uri.parse(VERIFICATION_URI_STRING), Uri.parse(ORIGINATING_URI_STRING), Uri.parse("http://a.different.uri/"), ORIGINATING_UID);
assertFalse(params1.equals(params2));
}
Aggregations