Exemplo n.º 1
0
        public void Should_return_false_if_permission_to_request_is_null()
        {
            var sut = new PermissionSet(
                new Permission("app.contents"),
                new Permission("app.assets"));

            Assert.False(sut.Allows(null));
        }
Exemplo n.º 2
0
        public void Should_return_false_if_none_permission_gives_permission_to_requested()
        {
            var sut = new PermissionSet(
                new Permission("app.contents"),
                new Permission("app.assets"));

            Assert.False(sut.Allows(new Permission("app.schemas")));
        }
Exemplo n.º 3
0
        public void Should_return_true_if_any_permission_gives_permission_to_requested()
        {
            var sut = new PermissionSet(
                new Permission("app.contents"),
                new Permission("app.assets"));

            Assert.True(sut.Allows(new Permission("app.contents")));
        }
Exemplo n.º 4
0
        public void Should_not_give_permission_if_requested_is_null()
        {
            var sut = new PermissionSet(
                new Permission("app.contents"),
                new Permission("app.assets"));

            Assert.False(sut.Allows(null));
        }
Exemplo n.º 5
0
        public void Should_not_give_permission_if_none_permission_allows()
        {
            var sut = new PermissionSet(
                new Permission("app.contents"),
                new Permission("app.assets"));

            Assert.False(sut.Allows(new Permission("app.schemas")));
        }
Exemplo n.º 6
0
        public void Should_give_permission_if_any_permission_allows()
        {
            var sut = new PermissionSet(
                new Permission("app.contents"),
                new Permission("app.assets"));

            Assert.True(sut.Allows(new Permission("app.contents")));
        }