Hello,
we need to mock Type.GetMethod() but seems that is not directly possible as when we are doing:
Mock.Arrange(() => fakeType.GetMethod("Validate")).Returns(fakeDelegate);
we are getting the following exception:
Telerik.JustMock.MockException: Cannot mock non-inheritable member 'System.Reflection.MethodInfo GetMethod(System.String)' on type 'System.Type' due to CLR limitations.
Anyway I a support ticket one of your team members told me something that can be useful (the question was related with another thing). He said:
" ... for these classes [talking about MethodIndo] we support only non-elevated mocking, through Mock.Create<T>() ..."
Not sure if this can help in our current problem or not. Is there any way to mock what we need?
Thanks in advance.
we need to mock Type.GetMethod() but seems that is not directly possible as when we are doing:
Mock.Arrange(() => fakeType.GetMethod("Validate")).Returns(fakeDelegate);
we are getting the following exception:
Telerik.JustMock.MockException: Cannot mock non-inheritable member 'System.Reflection.MethodInfo GetMethod(System.String)' on type 'System.Type' due to CLR limitations.
Anyway I a support ticket one of your team members told me something that can be useful (the question was related with another thing). He said:
" ... for these classes [talking about MethodIndo] we support only non-elevated mocking, through Mock.Create<T>() ..."
Not sure if this can help in our current problem or not. Is there any way to mock what we need?
Thanks in advance.