コード例 #1
0
        public void OpenFormAction_AnyUser_ReturnTrue()
        {                          // Arrange
            var userRole = "Team"; // Principal, Superintendent, Admin
            var action   = "OpenForm";
            //Act
            var result = CheckUserAction.ActionPermission(action, userRole);

            //Assert
            Assert.IsTrue(result);
        }
コード例 #2
0
        public void SOSignOffAction_SuperintendentUser_SchoolSignedOff_ReturnTrue()
        {                                    // Arrange
            var userRole = "Superintendent"; //   Principal
            var action   = "SOSignOff";

            CheckUserAction.SchoolSignedOff = "SignedOff"; // Complete
            //Act
            var result = CheckUserAction.ActionPermission(action, userRole);

            //Assert
            Assert.IsTrue(result);
        }
コード例 #3
0
        public void SOSignOffAction_OtherTehnSuperintendentUser_ReturnFalse()
        {                               // Arrange
            var userRole = "Principal"; //   Superintendent
            var action   = "SOSignOff";

            CheckUserAction.SchoolSignedOff = "SignedOff"; // Complete
            //Act
            var result = CheckUserAction.ActionPermission(action, userRole);

            //Assert
            Assert.IsFalse(result);
        }
コード例 #4
0
        public void SchoolSignOffAction_OtherThanPrincipal_ReturnFalse()
        {                              // Arrange
            var userRole = "SiteTeam"; //   Superintendent
            var action   = "SchoolSignOff";

            CheckUserAction.formComplete = "Complete"; // Complete
            //Act
            var result = CheckUserAction.ActionPermission(action, userRole);

            //Assert
            Assert.IsFalse(result);
        }
コード例 #5
0
        public void SchoolSignOffAction_PrincipalUser_FormInComplete_ReturnFalse()
        {                               // Arrange
            var userRole = "Principal"; // Principal, Superintendent, Admin
            var action   = "SchoolSignOff";

            CheckUserAction.formComplete = "InComplete";
            //Act
            var result = CheckUserAction.ActionPermission(action, userRole);

            //Assert
            Assert.IsFalse(result);
        }
コード例 #6
0
        public void PublishAction_OtherUser_SONotSignedOffYet_ReturnFalse()
        {                              // Arrange
            var userRole = "SiteTeam"; //   Principal
            var action   = "Publish";

            CheckUserAction.SOSignedOff = "SignedOff"; // Complete
            //Act
            var result = CheckUserAction.ActionPermission(action, userRole);

            //Assert
            Assert.IsFalse(result);
        }
コード例 #7
0
        public void PublishAction_PrincipalUser_SOSignedOff_ReturnTrue()
        {                               // Arrange
            var userRole = "Principal"; //   Principal
            var action   = "Publish";

            CheckUserAction.SOSignedOff = "SignedOff"; // Complete
            //Act
            var result = CheckUserAction.ActionPermission(action, userRole);

            //Assert
            Assert.IsTrue(result);
        }