public void Adding_students_to_different_grades_adds_them_to_the_same_sorted_roster()
    {
        var sut = new GradeSchool();

        sut.Add("Chelsea", 3);
        sut.Add("Logan", 7);
        var expected = new[] { "Chelsea", "Logan" };

        Assert.Equal(expected, sut.Roster());
    }
    public void Grade_returns_the_students_in_that_grade_in_alphabetical_order()
    {
        var sut = new GradeSchool();

        sut.Add("Franklin", 5);
        sut.Add("Bradley", 5);
        sut.Add("Jeff", 1);
        var expected = new[] { "Bradley", "Franklin" };

        Assert.Equal(expected, sut.Grade(5));
    }
    public void Adding_more_student_adds_them_to_the_sorted_roster()
    {
        var sut = new GradeSchool();

        sut.Add("Blair", 2);
        sut.Add("James", 2);
        sut.Add("Paul", 2);
        var expected = new[] { "Blair", "James", "Paul" };

        Assert.Equal(expected, sut.Roster());
    }
Exemplo n.º 4
0
    public void Add_throws_argument_excemption_if_arguments_are_invalid(string student, int age)
    {
        var    sut    = new GradeSchool();
        Action action = () => sut.Add(student, age);

        action.Should().Throw <ArgumentException>();
    }
    public void Adding_a_student_adds_them_to_the_sorted_roster()
    {
        var sut = new GradeSchool();

        sut.Add("Aimee", 2);
        var expected = new[] { "Aimee" };

        Assert.Equal(expected, sut.Roster());
    }
Exemplo n.º 6
0
    public void Adding_a_student_adds_them_to_the_sorted_roster()
    {
        var sut = new GradeSchool();

        sut.Add("Aimee", 2);
        var expected = new[] { "Aimee" };

        Assert.Equal(expected, sut.Roster());

        //string thing = "p";
        //string anotherThing = "notNull";

        //string lastString = thing = anotherThing;

        //Console.WriteLine(lastString);
    }
    public void Student_names_with_grades_are_displayed_in_the_same_sorted_roster()
    {
        var sut = new GradeSchool();

        sut.Add("Peter", 2);
        sut.Add("Anna", 1);
        sut.Add("Barb", 1);
        sut.Add("Zoe", 2);
        sut.Add("Alex", 2);
        sut.Add("Jim", 3);
        sut.Add("Charlie", 1);
        var expected = new[] { "Anna", "Barb", "Charlie", "Alex", "Peter", "Zoe", "Jim" };

        Assert.Equal(expected, sut.Roster());
    }