Add testing for validation
This commit is contained in:
@@ -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