Adding tests for rotation preference

Updating the gradle file to run tests directly from AndroidStudio

Change-Id: Iac23dfc6f995477f2406071fbfab3a16ee58ce6f
This commit is contained in:
Sunny Goyal
2015-10-16 17:18:54 -07:00
parent f79d347a61
commit 3d1c0ffba7
4 changed files with 113 additions and 8 deletions

View File

@@ -52,9 +52,12 @@ public class InvariantDeviceProfileTest extends AndroidTestCase {
public void testFindClosestDeviceProfile2() {
for (InvariantDeviceProfile idf: mPredefinedDeviceProfiles) {
ArrayList<InvariantDeviceProfile> predefinedProfilesCopy =
new ArrayList<>(mPredefinedDeviceProfiles);
ArrayList<InvariantDeviceProfile> closestProfiles =
mInvariantProfile.findClosestDeviceProfiles(
idf.minWidthDps, idf.minHeightDps, mPredefinedDeviceProfiles);
idf.minWidthDps, idf.minHeightDps, predefinedProfilesCopy
);
assertTrue(closestProfiles.get(0).equals(idf));
}
}