Skip to content

Commit 06eab69

Browse files
committed
Refactor examples
1 parent ac1b89b commit 06eab69

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Examples/Tests/ViewModelTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,27 @@ final class ViewModelTests: XCTestCase {
1616

1717
sut.initializeService(with: serviceName)
1818

19-
XCTAssertTrue(serviceSpy.initializeWithNameSecondNameCalled)
20-
XCTAssertEqual(serviceSpy.initializeWithNameSecondNameReceivedArguments?.name, serviceName)
19+
XCTAssertTrue(serviceSpy.initializeNameCalled)
20+
XCTAssertEqual(serviceSpy.initializeNameReceivedArguments?.name, serviceName)
2121
}
2222

2323
func testSaveConfig() async throws {
2424
let expectedConfig: [String: String] = ["key": "value"]
2525

26-
serviceSpy.fetchConfigWithArgReturnValue = expectedConfig
26+
serviceSpy.fetchConfigArgReturnValue = expectedConfig
2727

2828
try await sut.saveConfig()
2929

3030
XCTAssertEqual(sut.config, expectedConfig)
3131

32-
XCTAssertEqual(serviceSpy.fetchConfigWithArgCallsCount, 1)
33-
XCTAssertEqual(serviceSpy.fetchConfigWithArgReceivedInvocations, [1])
32+
XCTAssertEqual(serviceSpy.fetchConfigArgCallsCount, 1)
33+
XCTAssertEqual(serviceSpy.fetchConfigArgReceivedInvocations, [1])
3434

3535
try await sut.saveConfig()
3636

3737
XCTAssertTrue(sut.config.isEmpty)
3838

39-
XCTAssertEqual(serviceSpy.fetchConfigWithArgCallsCount, 2)
40-
XCTAssertEqual(serviceSpy.fetchConfigWithArgReceivedInvocations, [1, 2])
39+
XCTAssertEqual(serviceSpy.fetchConfigArgCallsCount, 2)
40+
XCTAssertEqual(serviceSpy.fetchConfigArgReceivedInvocations, [1, 2])
4141
}
4242
}

0 commit comments

Comments
 (0)