Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
flovnes committed Apr 30, 2024
1 parent 6b67066 commit 93ad1d9
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions tests/tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,23 @@ public static void Student_Constructor_ReturnStudentList()
}

[Fact]
public static void Student_Var10_ReturnStudents()
public static void Student_EvalAverage_ReturnDouble()
{
int counter = 0;
List<Student> students = [];
students.Add(new("Прізвище1 Ім'я1 По-батькові1 M 02.02.2000 - 4 5 1234"));
students.Add(new("surname FIRST_NAME 🔥 F 02.02.2000 3 1 3 1234"));
students.Add(new("1 2 3 4 5 - 5 - 6666"));
double[] expectedAverages = [3.7, 2.3, 3.0];
foreach (var (student, average) in students.Zip(expectedAverages))
{
Assert.Equal(average, Program.EvalAverage(student));
counter++;
}
}

[Fact]
public static void Student_FilterPhysicians_ReturnStudents()
{
List<Student> students = [];
students.Add(new("Андрущенко Вадим Миколайович M 23.06.2004 2 1 - 1285"));
Expand All @@ -32,22 +48,6 @@ public static void Student_Var10_ReturnStudents()
}
Assert.Equal(2, counter);
}

[Fact]
public static void Student_EvalAverage_ReturnDouble()
{
int counter = 0;
List<Student> students = [];
students.Add(new("Прізвище1 Ім'я1 По-батькові1 M 02.02.2000 - 4 5 1234"));
students.Add(new("surname FIRST_NAME 🔥 F 02.02.2000 3 1 3 1234"));
students.Add(new("1 2 3 4 5 - 5 - 6666"));
double[] expectedAverages = [3.7, 2.3, 3.0];
foreach (var (student, average) in students.Zip(expectedAverages))
{
Assert.Equal(average, Program.EvalAverage(student));
counter++;
}
}

[Fact]
public static void Student_FilterSummer_ReturnStudents()
Expand All @@ -57,13 +57,13 @@ public static void Student_FilterSummer_ReturnStudents()
students.Add(new("surname FIRST_NAME 🔥 F 02.06.3220 3 3 3 1234"));
students.Add(new("1 2 3 4 29.08.2002 - 5 - 6666"));

int count = 0;
int counter = 0;
foreach (Student student in students)
{
if (Program.IsBornInSummer(student))
count++;
counter++;
}
Assert.Equal(2, count);
Assert.Equal(2, counter);
}
}
}

0 comments on commit 93ad1d9

Please sign in to comment.