-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed tests for EmbraceNetworkLoggingService
- Loading branch information
Showing
7 changed files
with
120 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...oid-sdk/src/main/java/io/embrace/android/embracesdk/network/logging/DomainCountLimiter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.embrace.android.embracesdk.network.logging | ||
|
||
internal interface DomainCountLimiter { | ||
/** | ||
* Determines if a network request can be logged based on the domain limits. | ||
* | ||
* @param domain the domain of the network request | ||
* @return true if the network request should be logged, false otherwise | ||
*/ | ||
fun canLogNetworkRequest(domain: String): Boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...e-android-sdk/src/test/java/io/embrace/android/embracesdk/fakes/FakeDomainCountLimiter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.embrace.android.embracesdk.fakes | ||
|
||
import io.embrace.android.embracesdk.network.logging.DomainCountLimiter | ||
|
||
internal class FakeDomainCountLimiter : DomainCountLimiter { | ||
|
||
var canLog = true | ||
override fun canLogNetworkRequest(domain: String): Boolean { | ||
return canLog | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.