Implements IRoleManager and by default works with an internal wrapper that wrapps up the RoleManager class and thus provides testability.

The internal class (WrappedRoleManager) also implements IRoleManager and is by default (using the default constructor) created for the IRoleManager.

Since this is a wrapper the wrapped functionality should be possible to access and switch out. This may be done using the property RealRoleManager. If you set a mock here the real role manager is bypassed. This is useful in tests.

However since IRoleManager is an interface it may be mocked direct from your classes that use it when you write your tests.

Last edited Aug 24, 2009 at 10:00 AM by NoopMan, version 1


No comments yet.