private void AssertIsNotAuthorized(string azureUniqueId) { _authService.LoginUser(azureUniqueId); Assert.Throws <UnauthorizedAccessException>(() => _mutation.SetEvaluationStatus( evaluationId: _evaluation.Id, newStatus: Randomize.Status() ) ); }
/* 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); }