Exemple #1
0
    public void monthlyResultsTest()
    {
        String input = "";

        System.Random random = new System.Random();

        List <int> scores = new List <int>();

        for (int i = 0; i < 30; i++)
        {
            int result = random.Next(30, 300);
            scores.Add(result);
            String temp = (i + 1).ToString("00") + "-05-2018 " + result.ToString();
            if (i == 0)
            {
                input += temp;
            }
            else
            {
                input += "\n";
                input += temp;
            }
        }

        CollectionAssert.AreEqual(scores, CreateReportMock.getMonthlyResults(input));
    }
Exemple #2
0
    public void monthlyResultsInvalidInputTest()
    {
        List <int> scores = new List <int>();

        CollectionAssert.AreEqual(scores, CreateReportMock.getMonthlyResults("Invalid input"));
    }
Exemple #3
0
    public void monthlyResultsEmptyTest()
    {
        List <int> scores = new List <int>();

        CollectionAssert.AreEqual(scores, CreateReportMock.getMonthlyResults(""));
    }