Currently scalamock has different classes for MockFunction with same methods having different arguments. I wonder is it possible to generalize it using Selectable and applyDynamic somehow.
And also - what are specific usecases where applyDynamic can be used?
class MockFunction1[T1, R: Defaultable](mockContext: MockContext, name: Symbol) {
def expects(v1: MockParameter[T1]) = mockContext.add(new CallHandler1[T1, R](this, v1))
}
class MockFunction2[T1, T2, R: Defaultable](mockContext: MockContext, name: Symbol) {
def expects(v1: MockParameter[T1], v2: MockParameter[T2]) = mockContext.add(new CallHandler2[T1, T2, R](this, v1, v2))
}