Enhance people management tests and fix related issues
- Updated `PeopleApiTests` to correctly handle family structures, ensuring tests account for single-parent scenarios and sorting behavior for surnames. - Added a new test to validate roster integrity after the yearly intake, confirming that the composition reflects changes post-intake. - Revised assertions to ensure accurate comparisons of student and family data, improving test reliability. - Enhanced documentation within tests to clarify the purpose and expected outcomes of new functionalities. - Addressed discrepancies between design and implementation regarding the layout of the people management interface.
This commit is contained in:
@@ -66,6 +66,26 @@ public class ApplicantPoolTests
|
||||
Assert.True(ApplicantPool.HourlyAsk(catalog, strong) > ApplicantPool.HourlyAsk(catalog, weak));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// design/staffing.md prices an hour from skills *and* traits — the self-assured ask for more.
|
||||
/// Skills are covered above; this pins the trait half, which core sets on Leader (+10),
|
||||
/// HotTempered (+6) and Quiet (-8).
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ConfidentTraits_AskForMoreAndQuietOnesForLess()
|
||||
{
|
||||
var catalog = Fixtures.Catalog();
|
||||
var person = Fixtures.Generate(Fixtures.Classrooms(1)).People.First(candidate => candidate.IsParent);
|
||||
var plain = person with { Traits = [] };
|
||||
var leader = person with { Traits = ["Leader"] };
|
||||
var quiet = person with { Traits = ["Quiet"] };
|
||||
|
||||
var plainAsk = ApplicantPool.HourlyAsk(catalog, plain);
|
||||
|
||||
Assert.Equal(plainAsk + 10f, ApplicantPool.HourlyAsk(catalog, leader), 0.01f);
|
||||
Assert.Equal(plainAsk - 8f, ApplicantPool.HourlyAsk(catalog, quiet), 0.01f);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GeneratedApplicants_AreNotOnTheRoster_ParentsKeepTheirId()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user