public void SaveEvaluation_GameDoesNotExists_Exception()
        {
            var target     = new EvaluationService();
            var evaluation = new Evaluation()
            {
                GameKey = 1
            };

            ExceptionAssert.IsThrowing(new SpecificationNotSatisfiedException("An evaluation should have a valid Game. The game with key '1' does not exists."), () => {
                target.SaveEvaluation(evaluation);
            });
        }
Exemple #2
0
        /// <summary>
        /// Creates a new Evaluation.
        /// </summary>
        /// <param name="evaluation">The Evaluation to create.</param>
        /// <returns>The created Evaluation with the key.</returns>
        public Evaluation Post(Evaluation evaluation)
        {
            m_service.SaveEvaluation(evaluation);

            return(evaluation);
        }
 public void SaveEvaluation_Null_Exception()
 {
     ExceptionAssert.IsThrowing(new ArgumentNullException("evaluation"), () => {
         m_target.SaveEvaluation(null);
     });
 }