diff options
author | Roshan Pius <rpius@google.com> | 2017-02-17 13:47:56 -0800 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2017-02-21 09:23:51 -0800 |
commit | 75a7e28a90482ea51dfc147aaa7d40b7915b5bf5 (patch) | |
tree | 748671c35ab914ec8f05291442e688cf1f5e5f4a /tests | |
parent | 5317e7c11c99d5cc8417c65cc73cf548f8f52b87 (diff) |
SupplicantStaIfaceHalTest: Fixing ordering nit
Move all the private methods below the tests.
Bug: 33383725
Test: Compiles
Change-Id: I04afd80ac2d32e78a330816be20fe50a9c19de58
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java b/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java index 2b0f4306e..312234fe3 100644 --- a/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java +++ b/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java @@ -912,31 +912,6 @@ public class SupplicantStaIfaceHalTest { verify(mWifiMonitor).broadcastSupplicantDisconnectionEvent(eq(WLAN_IFACE_NAME)); } - private void executeAndValidateHs20DeauthImminentCallback(boolean isEss) throws Exception { - executeAndValidateInitializationSequence(); - assertNotNull(mISupplicantStaIfaceCallback); - - byte[] bssid = NativeUtil.macAddressToByteArray(BSSID); - int reasonCode = isEss ? WnmData.ESS : WnmData.ESS + 1; - int reauthDelay = 5; - mISupplicantStaIfaceCallback.onHs20DeauthImminentNotice( - bssid, reasonCode, reauthDelay, HS20_URL); - - ArgumentCaptor<WnmData> wnmDataCaptor = ArgumentCaptor.forClass(WnmData.class); - verify(mWifiMonitor).broadcastWnmEvent(eq(WLAN_IFACE_NAME), wnmDataCaptor.capture()); - assertEquals( - ByteBufferReader.readInteger( - ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length), - wnmDataCaptor.getValue().getBssid()); - assertEquals(isEss, wnmDataCaptor.getValue().isEss()); - assertEquals(reauthDelay, wnmDataCaptor.getValue().getDelay()); - assertEquals(HS20_URL, wnmDataCaptor.getValue().getUrl()); - } - - private void executeAndValidateInitializationSequence() throws Exception { - executeAndValidateInitializationSequence(false, false, false, false); - } - /** * Tests the setting of log level. */ @@ -975,6 +950,31 @@ public class SupplicantStaIfaceHalTest { verify(mISupplicantMock).setConcurrencyPriority(eq(IfaceType.STA)); } + private void executeAndValidateHs20DeauthImminentCallback(boolean isEss) throws Exception { + executeAndValidateInitializationSequence(); + assertNotNull(mISupplicantStaIfaceCallback); + + byte[] bssid = NativeUtil.macAddressToByteArray(BSSID); + int reasonCode = isEss ? WnmData.ESS : WnmData.ESS + 1; + int reauthDelay = 5; + mISupplicantStaIfaceCallback.onHs20DeauthImminentNotice( + bssid, reasonCode, reauthDelay, HS20_URL); + + ArgumentCaptor<WnmData> wnmDataCaptor = ArgumentCaptor.forClass(WnmData.class); + verify(mWifiMonitor).broadcastWnmEvent(eq(WLAN_IFACE_NAME), wnmDataCaptor.capture()); + assertEquals( + ByteBufferReader.readInteger( + ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length), + wnmDataCaptor.getValue().getBssid()); + assertEquals(isEss, wnmDataCaptor.getValue().isEss()); + assertEquals(reauthDelay, wnmDataCaptor.getValue().getDelay()); + assertEquals(HS20_URL, wnmDataCaptor.getValue().getUrl()); + } + + private void executeAndValidateInitializationSequence() throws Exception { + executeAndValidateInitializationSequence(false, false, false, false); + } + /** * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the * expected result. Verifies if ISupplicantStaIface manager is initialized or reset. |