示例#1
0
 private void AssertIsNotAuthorized(string azureUniqueId)
 {
     _authService.LoginUser(azureUniqueId);
     Assert.Throws <UnauthorizedAccessException>(() =>
                                                 _mutation.SetEvaluationStatus(
                                                     evaluationId: _evaluation.Id,
                                                     newStatus: Randomize.Status()
                                                     )
                                                 );
 }
示例#2
0
        /* Helper methods */

        private void AssertCanSet(Participant user)
        {
            _authService.LoginUser(user);

            Status status = Randomize.Status();

            _mutation.SetEvaluationStatus(
                evaluationId: _evaluation.Id,
                newStatus: status
                );

            Assert.True(_evaluation.Status == status);
        }