Update design documentation for inventory and climate phases, clarify staffing test results, and add new presence test for hiring and assigning a teacher during lessons.
This commit is contained in:
@@ -221,6 +221,40 @@ public class PresenceTests
|
||||
Assert.Equal(Fingerprint(skipped.CapturePresence()), Fingerprint(lived.CapturePresence()));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void HireAndAssignMath_DuringLessonThree_PutsSomeoneOnCampus()
|
||||
{
|
||||
var start = new DateTime(2012, 4, 3, 10, 20, 0, DateTimeKind.Utc);
|
||||
using var school = OpenEmpty(start);
|
||||
school.Tick(0.2d, 5d);
|
||||
Assert.True(school.IsCampusEmpty());
|
||||
|
||||
var catalog = school.Catalog!;
|
||||
var map = school.Map!;
|
||||
var hired = Staffing.Hire(
|
||||
catalog,
|
||||
map,
|
||||
school.Roster!,
|
||||
school.Applicants!,
|
||||
school.Applicants!.Applicants[0].Person.Id,
|
||||
Staffing.TeacherPosition,
|
||||
Cap);
|
||||
Assert.Equal(StaffingError.None, hired.Error);
|
||||
school.ApplyStaffing(hired.Roster, hired.Pool);
|
||||
|
||||
var assigned = Staffing.AssignSubject(catalog, hired.Roster, hired.Pool, hired.Roster.People.Single(person => person.IsStaff).Id, "Mathematics", Cap);
|
||||
Assert.Equal(StaffingError.None, assigned.Error);
|
||||
school.ApplyStaffing(assigned.Roster, assigned.Pool);
|
||||
school.SetTimetable(SchoolTimetables.Build(catalog, map, assigned.Roster, null, weekDays: 5));
|
||||
|
||||
for (var i = 0; i < 20; i++)
|
||||
{
|
||||
school.Tick(0.2d, 5d);
|
||||
}
|
||||
|
||||
Assert.Contains(school.CapturePresence(), row => row.NodeId is not null);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Simulation_DoesNotReferenceSockets()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user