Hi,
I ran this code:
var fake_client_auth_context = Isolate.Fake.Instance<AuthorizationContext>(Members.ReturnRecursiveFakes);
Isolate.WhenCalled(() => ServiceSecurityContext.Current.AuthorizationContext).WillReturn(fake_client_auth_context);
var fake_claim_set_list = new List<ClaimSet>();
var fake_claim = new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dns", "fake-cf-system", "possess");
var fake_claim_set = new DefaultClaimSet(new Claim[] {fake_claim});
fake_claim_set_list.Add(fake_claim_set);
Isolate.WhenCalled(() => fake_client_auth_context.ClaimSets).WillReturnCollectionValuesOf(fake_claim_set_list);
and got this exception back for the last line:
TypeMock.TypeMockException was unhandled by user code
Message=
*** Cannot mock unsupported types from mscorlib assembly. See supported types here: https://www.typemock.com/mscorlib-types
Source=TypeMock
StackTrace:
at TypeMock.MockManager.a(Type A_0, String A_1, Boolean A_2)
at TypeMock.MockManager.a(Type A_0, String A_1)
at TypeMock.MockManager.g(Type A_0)
at TypeMock.MockManager.Mock(Type type, Constructor mockConstructors)
at TypeMock.MockManager.a(Type A_0, Constructor A_1, Object[] A_2, Boolean A_3)
at TypeMock.MockManager.MockObject(Type type, Constructor mockConstructors, Object[] args)
at TypeMock.MockManager.MockObject[TMockedType]()
at TypeMock.ArrangeActAssert.ExpectationEngine`1.a(IEnumerable A_0)
at ... in ...
InnerException:
I'm a little baffled -- this seems like something I should be able to mock. The unit test code is VS2010 and I'm trying to test a VS2005 method. Is that the problem? I'm evaluating this software and if I can't even mock the authentication, I don't see how I can use this software.
According to the website linked in the exception (
https://www.typemock.com/mscorlib-types), I can only mock the following types from mscorlib:
The following types are currently supported by Typemock Isolator:
[list]
System -