public void Test_SkipCheck_Fail()
        {
            EntityRef user;

            user = new EntityRef(1);

            Assert.That(EntityAccessControlChecker.SkipCheck(user), Is.False);
        }
        public void Test_SkipCheck_GlobalUser()
        {
            EntityRef user;

            user = new EntityRef(0); // 0 = Global tenant

            Assert.That(EntityAccessControlChecker.SkipCheck(user), Is.True);
        }
        public void Test_SkipCheck_Bypass()
        {
            EntityRef user;

            user = new EntityRef(1);

            using (new SecurityBypassContext())
            {
                Assert.That(EntityAccessControlChecker.SkipCheck(user), Is.True);
            }
        }
 public void Test_SkipCheck_NullUser()
 {
     Assert.That(() => EntityAccessControlChecker.SkipCheck(null),
                 Throws.TypeOf <ArgumentNullException>().And.Property("ParamName").EqualTo("user"));
 }