You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
final class when_user_performs_add_operation_using_calculator: XCTestCase {
@Mock private var calculatorService: CalculatorServiceProtocol
func test_should_add_successfully() {
// expectation
given(calculatorService).??? // how to call the add method and return value
}
}
My confusion is that how do I call the add method on the CalculatorServiceProtocol. The .add method never shows up.
The text was updated successfully, but these errors were encountered:
I created a very simple protocol which I want to mock.
In my test I write the following:
My confusion is that how do I call the add method on the CalculatorServiceProtocol. The .add method never shows up.
The text was updated successfully, but these errors were encountered: