summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2018-03-30 20:43:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-03-30 20:43:20 +0000
commitb485ce7e9ecf0fa448e0224f6e410a1a5f0c86f5 (patch)
tree5418bddb2e4eca8e5ada34c87453cd205c370622 /tests
parent7f2ad1138dd909072afc14af1e1283b3d8eaa7bd (diff)
parentb865ae432e451bedf561619ce50ff4430447046b (diff)
Merge "[WifiScoreReport] Eliminate one name for 50" into pi-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java5
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java9
2 files changed, 6 insertions, 8 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java b/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java
index 949350332..23ae660f5 100644
--- a/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java
@@ -37,7 +37,6 @@ import org.mockito.Spy;
*/
public class VelocityBasedConnectedScoreTest {
- private static final int CELLULAR_THRESHOLD_SCORE = 50;
class FakeClock extends Clock {
long mWallClockMillis = 1500000000000L;
@@ -109,7 +108,7 @@ public class VelocityBasedConnectedScoreTest {
mClock.getWallClockMillis());
}
int score = mVelocityBasedConnectedScore.generateScore();
- assertTrue(score > CELLULAR_THRESHOLD_SCORE);
+ assertTrue(score > ConnectedScore.WIFI_TRANSITION_SCORE);
}
/**
@@ -130,6 +129,6 @@ public class VelocityBasedConnectedScoreTest {
mClock.getWallClockMillis());
}
int score = mVelocityBasedConnectedScore.generateScore();
- assertTrue(score < CELLULAR_THRESHOLD_SCORE);
+ assertTrue(score < ConnectedScore.WIFI_TRANSITION_SCORE);
}
}
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java b/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java
index c47de58be..d60264c61 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java
@@ -48,7 +48,6 @@ import java.io.PrintWriter;
*/
public class WifiScoreReportTest {
- private static final int CELLULAR_THRESHOLD_SCORE = 50;
class FakeClock extends Clock {
long mWallClockMillis = 1500000000000L;
@@ -189,7 +188,7 @@ public class WifiScoreReportTest {
mWifiScoreReport.calculateAndReportScore(mWifiInfo, mNetworkAgent, mWifiMetrics);
}
int score = mWifiInfo.score;
- assertTrue(score > CELLULAR_THRESHOLD_SCORE);
+ assertTrue(score > ConnectedScore.WIFI_TRANSITION_SCORE);
}
/**
@@ -212,7 +211,7 @@ public class WifiScoreReportTest {
mWifiScoreReport.calculateAndReportScore(mWifiInfo, mNetworkAgent, mWifiMetrics);
}
int score = mWifiInfo.score;
- assertTrue(score < CELLULAR_THRESHOLD_SCORE);
+ assertTrue(score < ConnectedScore.WIFI_TRANSITION_SCORE);
verify(mNetworkAgent, atLeast(1)).sendNetworkScore(score);
}
@@ -231,7 +230,7 @@ public class WifiScoreReportTest {
}
int score = mWifiInfo.score;
verify(mNetworkAgent, atLeast(1)).sendNetworkScore(score);
- assertTrue(oops, score < CELLULAR_THRESHOLD_SCORE);
+ assertTrue(oops, score < ConnectedScore.WIFI_TRANSITION_SCORE);
}
/**
@@ -257,7 +256,7 @@ public class WifiScoreReportTest {
oops += ":" + mWifiInfo.score;
if (mWifiInfo.score < minScore) minScore = mWifiInfo.score;
}
- assertTrue(oops, minScore > CELLULAR_THRESHOLD_SCORE);
+ assertTrue(oops, minScore > ConnectedScore.WIFI_TRANSITION_SCORE);
}
/**