mirror of
https://github.com/pointfreeco/swift-composable-architecture.git
synced 2025-12-24 12:14:25 +01:00
Update docs/examples to leverage TestStore.send(\.path) (#2868)
This commit is contained in:
@@ -31,24 +31,24 @@ final class UIKitCaseStudiesTests: XCTestCase {
|
||||
CounterList()
|
||||
}
|
||||
|
||||
await store.send(.counters(.element(id: firstState.id, action: .incrementButtonTapped))) {
|
||||
await store.send(\.counters[id: firstState.id].incrementButtonTapped) {
|
||||
$0.counters[id: firstState.id]?.count = 1
|
||||
}
|
||||
await store.send(.counters(.element(id: firstState.id, action: .decrementButtonTapped))) {
|
||||
await store.send(\.counters[id: firstState.id].decrementButtonTapped) {
|
||||
$0.counters[id: firstState.id]?.count = 0
|
||||
}
|
||||
|
||||
await store.send(.counters(.element(id: secondState.id, action: .incrementButtonTapped))) {
|
||||
await store.send(\.counters[id: secondState.id].incrementButtonTapped) {
|
||||
$0.counters[id: secondState.id]?.count = 1
|
||||
}
|
||||
await store.send(.counters(.element(id: secondState.id, action: .decrementButtonTapped))) {
|
||||
await store.send(\.counters[id: secondState.id].decrementButtonTapped) {
|
||||
$0.counters[id: secondState.id]?.count = 0
|
||||
}
|
||||
|
||||
await store.send(.counters(.element(id: thirdState.id, action: .incrementButtonTapped))) {
|
||||
await store.send(\.counters[id: thirdState.id].incrementButtonTapped) {
|
||||
$0.counters[id: thirdState.id]?.count = 1
|
||||
}
|
||||
await store.send(.counters(.element(id: thirdState.id, action: .decrementButtonTapped))) {
|
||||
await store.send(\.counters[id: thirdState.id].decrementButtonTapped) {
|
||||
$0.counters[id: thirdState.id]?.count = 0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user