test: fix existing unit tests of OCMock where now, by default, `objcVerify`'s quantifier is `.exactly(1)` instead of `.atLeast(1)`
This commit is contained in:
parent
46c89bebb7
commit
8f5e18ed41
|
@ -158,7 +158,7 @@ class ObjectiveClassTest: XCTestCase {
|
||||||
XCTAssertFalse(mock.dudka(lelo: "heya"))
|
XCTAssertFalse(mock.dudka(lelo: "heya"))
|
||||||
XCTAssertTrue(mock.dudka(lelo: "heyda"))
|
XCTAssertTrue(mock.dudka(lelo: "heyda"))
|
||||||
|
|
||||||
objcVerify(mock.dudka(lelo: objcAny()))
|
objcVerify(mock.dudka(lelo: objcAny()), .atLeast(1))
|
||||||
}
|
}
|
||||||
|
|
||||||
func testVerifyAtLeast() {
|
func testVerifyAtLeast() {
|
||||||
|
|
|
@ -36,9 +36,9 @@ class ObjectiveProtocolTest: XCTestCase {
|
||||||
|
|
||||||
objcVerify(mock.tableView!(objcAny(), canFocusRowAt: IndexPath(row: 0, section: 22)))
|
objcVerify(mock.tableView!(objcAny(), canFocusRowAt: IndexPath(row: 0, section: 22)))
|
||||||
objcVerify(mock.tableView!(tableView, canFocusRowAt: IndexPath(row: 0, section: 22)))
|
objcVerify(mock.tableView!(tableView, canFocusRowAt: IndexPath(row: 0, section: 22)))
|
||||||
objcVerify(mock.tableView!(objcAny(), canFocusRowAt: IndexPath(row: 1, section: 22)))
|
objcVerify(mock.tableView!(objcAny(), canFocusRowAt: IndexPath(row: 1, section: 22)), .atLeast(1))
|
||||||
objcVerify(mock.tableView!(tableView, canFocusRowAt: IndexPath(row: 1, section: 22)))
|
objcVerify(mock.tableView!(tableView, canFocusRowAt: IndexPath(row: 1, section: 22)))
|
||||||
objcVerify(mock.tableView!(objcAny(), canFocusRowAt: IndexPath(row: 1, section: 22)))
|
objcVerify(mock.tableView!(objcAny(), canFocusRowAt: IndexPath(row: 1, section: 22)), .atLeast(1))
|
||||||
objcVerify(mock.tableView!(tableView, canFocusRowAt: IndexPath(row: 1, section: 22)))
|
objcVerify(mock.tableView!(tableView, canFocusRowAt: IndexPath(row: 1, section: 22)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class ObjectiveProtocolTest: XCTestCase {
|
||||||
|
|
||||||
objcVerify(mock.textField!(objcAny(), shouldChangeCharactersIn: range, replacementString: "Hello from the other side, ObjC!"))
|
objcVerify(mock.textField!(objcAny(), shouldChangeCharactersIn: range, replacementString: "Hello from the other side, ObjC!"))
|
||||||
objcVerify(mock.textField!(objcAny(), shouldChangeCharactersIn: range, replacementString: "TadeasKriz is a HaXoR."))
|
objcVerify(mock.textField!(objcAny(), shouldChangeCharactersIn: range, replacementString: "TadeasKriz is a HaXoR."))
|
||||||
objcVerify(mock.textField!(objcAny(), shouldChangeCharactersIn: range, replacementString: objcAny()))
|
objcVerify(mock.textField!(objcAny(), shouldChangeCharactersIn: range, replacementString: objcAny()), .atLeast(1))
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: This is an example of a wrong way to test an optional method.
|
// NOTE: This is an example of a wrong way to test an optional method.
|
||||||
|
|
Loading…
Reference in New Issue