diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..4364e18e --- /dev/null +++ b/codecov.yml @@ -0,0 +1,2 @@ +codecov: + branch: 3.x \ No newline at end of file diff --git a/wisefy/src/androidTest/java/com/isupatches/wisefy/main/ConnectToNetworkTests.kt b/wisefy/src/androidTest/java/com/isupatches/wisefy/main/ConnectToNetworkTests.kt index 7f4bbd8a..75012ffb 100644 --- a/wisefy/src/androidTest/java/com/isupatches/wisefy/main/ConnectToNetworkTests.kt +++ b/wisefy/src/androidTest/java/com/isupatches/wisefy/main/ConnectToNetworkTests.kt @@ -69,7 +69,7 @@ internal class ConnectToNetworkTests : BaseAndroidJUnit4TestClass() { mockWiseFyPrechecksUtil.connectToNetwork_success() mockWiseFySearchUtil.findSavedNetworkByRegex_null() val mockCallbacks = mock(ConnectToNetworkCallbacks::class.java) - wiseFy.connectToNetwork(TEST_SSID, TEST_TIMEOUT, mockCallbacks) + wisefy.connectToNetwork(TEST_SSID, TEST_TIMEOUT, mockCallbacks) verify(mockCallbacks, timeout(VERIFICATION_SUCCESS_TIMEOUT)).networkNotFoundToConnectTo() verificationUtil.didNotTryToConnectToNetwork() } @@ -86,7 +86,7 @@ internal class ConnectToNetworkTests : BaseAndroidJUnit4TestClass() { mockWiseFySearchUtil.findSavedNetworkByRegex_success() mockWiseFyConnectionUtil.waitToConnectToSSID(false) val mockCallbacks = mock(ConnectToNetworkCallbacks::class.java) - wiseFy.connectToNetwork(TEST_SSID, TEST_TIMEOUT, mockCallbacks) + wisefy.connectToNetwork(TEST_SSID, TEST_TIMEOUT, mockCallbacks) verify(mockCallbacks, timeout(VERIFICATION_SUCCESS_TIMEOUT)).failureConnectingToNetwork() verificationUtil.triedToConnectToNetwork() } @@ -104,7 +104,7 @@ internal class ConnectToNetworkTests : BaseAndroidJUnit4TestClass() { mockWiseFySearchUtil.findSavedNetworkByRegex_success() mockWiseFyConnectionUtil.waitToConnectToSSID(true) val mockCallbacks = mock(ConnectToNetworkCallbacks::class.java) - wiseFy.connectToNetwork(TEST_SSID, TEST_TIMEOUT, mockCallbacks) + wisefy.connectToNetwork(TEST_SSID, TEST_TIMEOUT, mockCallbacks) verify(mockCallbacks, timeout(VERIFICATION_SUCCESS_TIMEOUT)).connectedToNetwork() verificationUtil.triedToConnectToNetwork() } diff --git a/wisefy/src/androidTest/java/com/isupatches/wisefy/main/IsNetworkPSKTest.kt b/wisefy/src/androidTest/java/com/isupatches/wisefy/main/IsNetworkPSKTest.kt index 0756974a..dec75c53 100644 --- a/wisefy/src/androidTest/java/com/isupatches/wisefy/main/IsNetworkPSKTest.kt +++ b/wisefy/src/androidTest/java/com/isupatches/wisefy/main/IsNetworkPSKTest.kt @@ -16,25 +16,25 @@ internal class IsNetworkPSKTest : BaseAndroidJUnit4TestClass() { @Test fun failure_differentCapability() { val scanResult = createMockAccessPointWithCapabilities("Other") - assertEquals(false, wiseFy.isNetworkPSK(scanResult)) + assertEquals(false, wisefy.isNetworkPSK(scanResult)) } @Test fun failure_emptyCapabilities() { val scanResult = createMockAccessPointWithCapabilities("") - assertEquals(false, wiseFy.isNetworkPSK(scanResult)) + assertEquals(false, wisefy.isNetworkPSK(scanResult)) } @Test fun failure_nullCapabilities() { val scanResult = createMockAccessPointWithCapabilities(null) - assertEquals(false, wiseFy.isNetworkPSK(scanResult)) + assertEquals(false, wisefy.isNetworkPSK(scanResult)) } @Test fun failure_nullScanResult() { - assertEquals(false, wiseFy.isNetworkPSK(null)) + assertEquals(false, wisefy.isNetworkPSK(null)) } @Test fun success() { val scanResult = createMockAccessPointWithCapabilities(PSK) - assertEquals(true, wiseFy.isNetworkPSK(scanResult)) + assertEquals(true, wisefy.isNetworkPSK(scanResult)) } }