@@ -5,7 +5,7 @@ import XCTest
55
66class TodosTests : XCTestCase {
77 let scheduler = DispatchQueue . testScheduler
8-
8+
99 func testAddTodo( ) {
1010 let store = TestStore (
1111 initialState: AppState ( ) ,
@@ -15,7 +15,7 @@ class TodosTests: XCTestCase {
1515 uuid: UUID . incrementing
1616 )
1717 )
18-
18+
1919 store. send ( . addTodoButtonTapped) {
2020 $0. todos. insert (
2121 Todo (
@@ -27,7 +27,7 @@ class TodosTests: XCTestCase {
2727 )
2828 }
2929 }
30-
30+
3131 func testEditTodo( ) {
3232 let state = AppState (
3333 todos: [
@@ -46,14 +46,14 @@ class TodosTests: XCTestCase {
4646 uuid: UUID . incrementing
4747 )
4848 )
49-
49+
5050 store. send (
5151 . todo( id: state. todos [ 0 ] . id, action: . textFieldChanged( " Learn Composable Architecture " ) )
5252 ) {
5353 $0. todos [ 0 ] . description = " Learn Composable Architecture "
5454 }
5555 }
56-
56+
5757 func testCompleteTodo( ) {
5858 let state = AppState (
5959 todos: [
@@ -77,7 +77,7 @@ class TodosTests: XCTestCase {
7777 uuid: UUID . incrementing
7878 )
7979 )
80-
80+
8181 store. send ( . todo( id: state. todos [ 0 ] . id, action: . checkBoxToggled) ) {
8282 $0. todos [ 0 ] . isComplete = true
8383 }
@@ -89,7 +89,7 @@ class TodosTests: XCTestCase {
8989 ]
9090 }
9191 }
92-
92+
9393 func testCompleteTodoDebounces( ) {
9494 let state = AppState (
9595 todos: [
@@ -113,7 +113,7 @@ class TodosTests: XCTestCase {
113113 uuid: UUID . incrementing
114114 )
115115 )
116-
116+
117117 store. send ( . todo( id: state. todos [ 0 ] . id, action: . checkBoxToggled) ) {
118118 $0. todos [ 0 ] . isComplete = true
119119 }
@@ -124,7 +124,7 @@ class TodosTests: XCTestCase {
124124 self . scheduler. advance ( by: 1 )
125125 store. receive ( . sortCompletedTodos)
126126 }
127-
127+
128128 func testClearCompleted( ) {
129129 let state = AppState (
130130 todos: [
@@ -148,14 +148,14 @@ class TodosTests: XCTestCase {
148148 uuid: UUID . incrementing
149149 )
150150 )
151-
151+
152152 store. send ( . clearCompletedButtonTapped) {
153153 $0. todos = [
154154 $0. todos [ 0 ]
155155 ]
156156 }
157157 }
158-
158+
159159 func testDelete( ) {
160160 let state = AppState (
161161 todos: [
@@ -184,15 +184,15 @@ class TodosTests: XCTestCase {
184184 uuid: UUID . incrementing
185185 )
186186 )
187-
187+
188188 store. send ( . delete( [ 1 ] ) ) {
189189 $0. todos = [
190190 $0. todos [ 0 ] ,
191191 $0. todos [ 2 ] ,
192192 ]
193193 }
194194 }
195-
195+
196196 func testEditModeMoving( ) {
197197 let state = AppState (
198198 todos: [
@@ -221,7 +221,7 @@ class TodosTests: XCTestCase {
221221 uuid: UUID . incrementing
222222 )
223223 )
224-
224+
225225 store. send ( . editModeChanged( . active) ) {
226226 $0. editMode = . active
227227 }
@@ -235,7 +235,7 @@ class TodosTests: XCTestCase {
235235 self . scheduler. advance ( by: . milliseconds( 100 ) )
236236 store. receive ( . sortCompletedTodos)
237237 }
238-
238+
239239 func testFilteredEdit( ) {
240240 let state = AppState (
241241 todos: [
@@ -259,7 +259,7 @@ class TodosTests: XCTestCase {
259259 uuid: UUID . incrementing
260260 )
261261 )
262-
262+
263263 store. send ( . filterPicked( . completed) ) {
264264 $0. filter = . completed
265265 }
0 commit comments