From 06eab690ef0528bd15cd9d2ef394ffd41dc96dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Ba=CC=A8k?= <44930823+Matejkob@users.noreply.github.com> Date: Wed, 14 Jun 2023 16:21:41 +0200 Subject: [PATCH] Refactor examples --- Examples/Tests/ViewModelTests.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Examples/Tests/ViewModelTests.swift b/Examples/Tests/ViewModelTests.swift index a7a98f1..d935714 100644 --- a/Examples/Tests/ViewModelTests.swift +++ b/Examples/Tests/ViewModelTests.swift @@ -16,27 +16,27 @@ final class ViewModelTests: XCTestCase { sut.initializeService(with: serviceName) - XCTAssertTrue(serviceSpy.initializeWithNameSecondNameCalled) - XCTAssertEqual(serviceSpy.initializeWithNameSecondNameReceivedArguments?.name, serviceName) + XCTAssertTrue(serviceSpy.initializeNameCalled) + XCTAssertEqual(serviceSpy.initializeNameReceivedArguments?.name, serviceName) } func testSaveConfig() async throws { let expectedConfig: [String: String] = ["key": "value"] - serviceSpy.fetchConfigWithArgReturnValue = expectedConfig + serviceSpy.fetchConfigArgReturnValue = expectedConfig try await sut.saveConfig() XCTAssertEqual(sut.config, expectedConfig) - XCTAssertEqual(serviceSpy.fetchConfigWithArgCallsCount, 1) - XCTAssertEqual(serviceSpy.fetchConfigWithArgReceivedInvocations, [1]) + XCTAssertEqual(serviceSpy.fetchConfigArgCallsCount, 1) + XCTAssertEqual(serviceSpy.fetchConfigArgReceivedInvocations, [1]) try await sut.saveConfig() XCTAssertTrue(sut.config.isEmpty) - XCTAssertEqual(serviceSpy.fetchConfigWithArgCallsCount, 2) - XCTAssertEqual(serviceSpy.fetchConfigWithArgReceivedInvocations, [1, 2]) + XCTAssertEqual(serviceSpy.fetchConfigArgCallsCount, 2) + XCTAssertEqual(serviceSpy.fetchConfigArgReceivedInvocations, [1, 2]) } }