Enhance staffing management in school simulation by introducing API endpoints for hiring staff and assigning subjects. Implement payroll cap validation to ensure hiring and subject assignments do not exceed the allocated budget. Update the simulation options to include a monthly payroll cap and revise related classes to support new staffing functionalities. Enhance documentation to reflect these changes and update tests to validate the new features.
This commit is contained in:
@@ -26,6 +26,9 @@ public class PeopleDefTests
|
||||
Assert.True(catalog.Subjects.ContainsKey("PrimarySchool"));
|
||||
Assert.NotNull(catalog.StaffingRules);
|
||||
Assert.Equal(12, catalog.StaffingRules.PoolSize);
|
||||
Assert.Equal(20, catalog.StaffingRules.BaseWeeklyHours);
|
||||
Assert.Equal(4, catalog.StaffingRules.WeeksPerMonth);
|
||||
Assert.Equal(0.25f, catalog.StaffingRules.ExtraSubjectSurcharge);
|
||||
Assert.Equal("Начальные классы", catalog.Label("ru", catalog.Subjects["PrimarySchool"]));
|
||||
Assert.Equal("Primary", catalog.Label("en", catalog.Subjects["PrimarySchool"]));
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ public class VanillaCoreTests
|
||||
Assert.True(catalog.Subjects.ContainsKey("PhysicalEducation"));
|
||||
Assert.NotNull(catalog.StaffingRules);
|
||||
Assert.Equal(12, catalog.StaffingRules.PoolSize);
|
||||
Assert.Equal(20, catalog.StaffingRules.BaseWeeklyHours);
|
||||
Assert.Equal(0.25f, catalog.StaffingRules.ExtraSubjectSurcharge);
|
||||
Assert.Equal(2, map.Buildings.Count);
|
||||
var homerooms = map.Rooms.Where(room => room.Def == "Classroom").ToList();
|
||||
Assert.Equal(11, homerooms.Count);
|
||||
|
||||
Reference in New Issue
Block a user