public void GetHighScoresTest() { int value = 10; List <HighScoreModel> highscores = new List <HighScoreModel>(); for (int i = 0; i < value; i++) { highscores.Add(new HighScoreModel()); } _highScoreService.Setup(hs => hs.GetHighScores(value)).Returns(highscores); OkObjectResult result = _highScoreController.GetHighScores(value) as OkObjectResult; List <HighScoreDtoRead> resultBody = (List <HighScoreDtoRead>)result.Value; Assert.IsInstanceOfType(result, typeof(OkObjectResult)); Assert.AreEqual(value, resultBody.Count); }
// Use this for initialization void Start() { //Reset the difficulty on load DifficultyController.ResetVariables(); highScoreText.text = HighScoreController.GetHighScores(); flashPanel.SetActive(false); AdjustScore(0); //Initialize the score text to current; TakeDamage(0, Color.black); //Initialize the text to the current health //Begin the incrememnting of the difficulty //Every 20 seconds, increment difficulty InvokeRepeating("IncrementDifficulty", .2f, difficultyIncrementInterval); }