public void ShouldGetItemAccessRules()
    {
      // arrange   
      this.helper.GetAccessRules(this.item).Returns(this.rules);

      this.provider = new FakeAuthorizationProvider(this.helper);

      // act & assert
      this.provider.GetAccessRules(this.item).Should().BeSameAs(this.rules);
    }
    public void ShouldSetItemAccessRules()
    {
      // arrange
      this.provider = new FakeAuthorizationProvider(this.helper);

      // act
      this.provider.SetAccessRules(this.item, this.rules);

      // assert
      this.helper.Received().SetAccessRules(this.item, this.rules);
    }
    public FakeAuthorizationProviderTest()
    {
      this.provider = new FakeAuthorizationProvider();

      this.localProvider = Substitute.For<AuthorizationProvider>();
      this.helper = Substitute.For<ItemAuthorizationHelper>();

      this.entity = Substitute.For<ISecurable>();
      this.item = ItemHelper.CreateInstance();
      this.rules = new AccessRuleCollection();
    }
 public FakeAuthorizationProviderTest()
 {
   this.provider = new FakeAuthorizationProvider();
   this.fixture = new Fixture();
   this.database = Database.GetDatabase("master");
 }