Exemplo n.º 1
0
        public void AddPermission()
        {
            var def = new PermissionDefinition("Test");

            def.Children.ShouldBeEmpty();
            def.AddChild("TestPermission");
            def.Children.ShouldHaveSingleItem().FullName.ShouldBe("Test.TestPermission");
        }
Exemplo n.º 2
0
        public void GetPermissionsWithChildren()
        {
            var def = new PermissionDefinition("Test");

            def.Children.ShouldBeEmpty();
            def
            .AddChild("TestPermission",
                      p => p.AddChild("TestChild"));
            def.Children.ShouldHaveSingleItem().Children.ShouldHaveSingleItem().FullName.ShouldBe("Test.TestPermission.TestChild");
        }