public override void Initialize(string name, NameValueCollection config)
    {
      // TODO: Move to configuration.
      var provider = new AuthorizationProviderStub();
      new Switcher<AuthorizationProvider, AuthorizationProvider>(provider);

      base.Initialize(name, config);
    }
    public void ShouldGetAccessPermissionAllow()
    {
      // arrange
      var provider = new AuthorizationProviderStub();

      var fixture = new Fixture();

      var entity = Substitute.For<ISecurable>();
      var account = fixture.Create<User>();
      var accessRight = fixture.Create<AccessRight>();

      // act
      provider.GetAccess(entity, account, accessRight).ShouldBeEquivalentTo(new AccessResult(AccessPermission.Allow, new AccessExplanation("Everything is allowed by design.")));
    }