Ejemplo n.º 1
0
    public void Disqualify_Should_Not_Decrease_All_Competitors_Count()
    {
        //Arrange

        var olympics = new Olympics();

        //Act

        olympics.AddCompetition(1, "SoftUniada", 500);

        olympics.AddCompetitor(5, "Ani");
        olympics.Compete(5, 1);

        olympics.AddCompetitor(1, "Ivan");
        olympics.Compete(1, 1);

        olympics.AddCompetitor(2, "Stamat");
        olympics.Compete(2, 1);
        olympics.Disqualify(1, 5);
        int expectedCompetitorsCount = 3;
        int actualCompetitorsCount   = olympics.CompetitorsCount();

        //Assert

        Assert.AreEqual(expectedCompetitorsCount, actualCompetitorsCount);
    }
Ejemplo n.º 2
0
    public void AddCompetitor_Count_Should_Increase()
    {
        //Arrange
        var olympics = new Olympics();

        olympics.AddCompetitor(1, "Ani");
        olympics.AddCompetitor(2, "Ivan");
        olympics.AddCompetitor(3, "Galin");
        olympics.AddCompetitor(4, "Kali");

        //Act
        int expectedCount = 4;
        int actualCount   = olympics.CompetitorsCount();

        //Assert
        Assert.AreEqual(expectedCount, actualCount);
    }