Example #1
0
        public void Test2()
        {
            IPredictionsRepository predictionsRepository = new PredictionsDatabaseRepository();

            predictionsRepository.GetPredictionById(2);
            Assert.Throws <Exception>((() => {
                if (predictionsRepository.GetPredictionById(2) != "")
                {
                    throw new Exception();
                }
            }));
        }
Example #2
0
        public void Test3()
        {
            IPredictionsRepository predictionsRepository = new PredictionsDatabaseRepository();
            PredictionDto          oldPred = new PredictionDto()
            {
                PredictionText = predictionsRepository.GetPredictionById(2)
            };

            predictionsRepository.UpdatePrediction(oldPred, new PredictionDto()
            {
                PredictionText = oldPred.PredictionText + "test"
            });
            Assert.Throws <Exception>((() => {
                if (predictionsRepository.GetPredictionById(2) != oldPred.PredictionText)
                {
                    throw new Exception();
                }
            }));
        }
Example #3
0
 public void GetPredictionByIdTest()
 {
     PredictionsDatabaseRepository repository = new PredictionsDatabaseRepository();
     var result = repository.GetPredictionById(1);
 }