Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let mockedClass = MockStudentManager()
- let studentToTest = someStudent //where someStudent is an instance of Student
- stub(mockStudentManager) { stub in
- //Two Objects are considered equal here when name, age and CourseName are equal
- when(stub.doesSomethingToStudent(student: equal( to: student,
- for: EqualityDescriptor(\Student.name),
- EqualityDescriptor(\Student.age),
- EqualityDescriptor(\Student.course.couseName)
- )
- )
- ).thenDoNothing()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement