@@ -18,15 +18,15 @@ final class AtomCurrentContextTests: XCTestCase {
18
18
let atom = TestValueAtom ( value: 0 )
19
19
let dependency = TestStateAtom ( defaultValue: 100 )
20
20
let store = AtomStore ( )
21
- let transaction = Transaction ( key: AtomKey ( atom) )
21
+ let transactionState = TransactionState ( key: AtomKey ( atom) )
22
22
let storeContext = StoreContext ( store: store)
23
23
let context = AtomCurrentContext ( store: storeContext)
24
24
25
- XCTAssertEqual ( storeContext. watch ( dependency, in: transaction ) , 100 )
25
+ XCTAssertEqual ( storeContext. watch ( dependency, in: transactionState ) , 100 )
26
26
27
27
context. set ( 200 , for: dependency)
28
28
29
- XCTAssertEqual ( storeContext. watch ( dependency, in: transaction ) , 200 )
29
+ XCTAssertEqual ( storeContext. watch ( dependency, in: transactionState ) , 200 )
30
30
}
31
31
32
32
@MainActor
@@ -58,15 +58,15 @@ final class AtomCurrentContextTests: XCTestCase {
58
58
let atom = TestValueAtom ( value: 0 )
59
59
let dependency = TestStateAtom ( defaultValue: 0 )
60
60
let store = AtomStore ( )
61
- let transaction = Transaction ( key: AtomKey ( atom) )
61
+ let transactionState = TransactionState ( key: AtomKey ( atom) )
62
62
let storeContext = StoreContext ( store: store)
63
- let context = AtomTransactionContext ( store: StoreContext ( store: store) , transaction : transaction )
63
+ let context = AtomTransactionContext ( store: StoreContext ( store: store) , transactionState : transactionState )
64
64
65
- XCTAssertEqual ( storeContext. watch ( dependency, in: transaction ) , 0 )
65
+ XCTAssertEqual ( storeContext. watch ( dependency, in: transactionState ) , 0 )
66
66
67
67
context [ dependency] = 100
68
68
69
- XCTAssertEqual ( storeContext. watch ( dependency, in: transaction ) , 100 )
69
+ XCTAssertEqual ( storeContext. watch ( dependency, in: transactionState ) , 100 )
70
70
71
71
context. reset ( dependency)
72
72
@@ -80,7 +80,7 @@ final class AtomCurrentContextTests: XCTestCase {
80
80
let storeContext = StoreContext ( store: store)
81
81
let transactionAtom = TestValueAtom ( value: 0 )
82
82
let atom = TestStateAtom ( defaultValue: 0 )
83
- let transaction = Transaction ( key: AtomKey ( transactionAtom) )
83
+ let transactionState = TransactionState ( key: AtomKey ( transactionAtom) )
84
84
85
85
let resettableAtom = TestCustomResettableAtom (
86
86
defaultValue: { context in
@@ -91,17 +91,17 @@ final class AtomCurrentContextTests: XCTestCase {
91
91
}
92
92
)
93
93
94
- XCTAssertEqual ( storeContext. watch ( atom, in: transaction ) , 0 )
95
- XCTAssertEqual ( storeContext. watch ( resettableAtom, in: transaction ) , 0 )
94
+ XCTAssertEqual ( storeContext. watch ( atom, in: transactionState ) , 0 )
95
+ XCTAssertEqual ( storeContext. watch ( resettableAtom, in: transactionState ) , 0 )
96
96
97
97
context [ atom] = 100
98
98
99
- XCTAssertEqual ( storeContext. watch ( atom, in: transaction ) , 100 )
100
- XCTAssertEqual ( storeContext. watch ( resettableAtom, in: transaction ) , 100 )
99
+ XCTAssertEqual ( storeContext. watch ( atom, in: transactionState ) , 100 )
100
+ XCTAssertEqual ( storeContext. watch ( resettableAtom, in: transactionState ) , 100 )
101
101
102
102
context. reset ( resettableAtom)
103
103
104
- XCTAssertEqual ( storeContext. watch ( atom, in: transaction ) , 300 )
105
- XCTAssertEqual ( storeContext. watch ( resettableAtom, in: transaction ) , 300 )
104
+ XCTAssertEqual ( storeContext. watch ( atom, in: transactionState ) , 300 )
105
+ XCTAssertEqual ( storeContext. watch ( resettableAtom, in: transactionState ) , 300 )
106
106
}
107
107
}
0 commit comments