Add testing for validation
This commit is contained in:
@@ -147,6 +147,7 @@ public class StudentBuilder
|
||||
Rank = rank
|
||||
};
|
||||
student.EventRankings.Add(ranking);
|
||||
student.RankedEvents.Add(eventDef); // Also add to RankedEvents for validation rules
|
||||
}
|
||||
|
||||
return student;
|
||||
|
||||
@@ -21,10 +21,12 @@ public class TeamBuilder
|
||||
return this;
|
||||
}
|
||||
|
||||
public TeamBuilder WithStudent(Student student)
|
||||
public TeamBuilder WithStudent(Student student, bool isCaptain = false)
|
||||
{
|
||||
if (!_students.Contains(student))
|
||||
_students.Add(student);
|
||||
if (isCaptain)
|
||||
_captain = student;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user