• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Unleash / unleash-android / 10092928882

25 Jul 2024 11:02AM CUT coverage: 82.296% (+1.6%) from 80.724%
10092928882

push

github

web-flow
tests: network status helper (#69)

* tests: network status helper

* Test listener registration

208 of 282 branches covered (73.76%)

Branch coverage included in aggregate %.

7 of 7 new or added lines in 1 file covered. (100.0%)

638 of 746 relevant lines covered (85.52%)

5.47 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/unleashandroidsdk/src/main/java/io/getunleash/android/cache/InMemoryToggleCache.kt
1
package io.getunleash.android.cache
2

3
import io.getunleash.android.data.Toggle
4
import io.getunleash.android.data.UnleashState
5

6
class InMemoryToggleCache : ToggleCache {
3✔
7
    @Volatile
8
    private var internalCache = emptyMap<String, Toggle>()
3✔
9

10
    override fun read(): Map<String, Toggle> {
11
        return internalCache
×
12
    }
13

14
    override fun get(key: String): Toggle? {
15
        return internalCache[key]
6✔
16
    }
17

18
    override fun write(state: UnleashState) {
19
        internalCache = state.toggles
4✔
20
    }
1✔
21
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc