Enhance event occurrence parsing to correctly skip high school events
This commit updates the EventOccurrenceParser to ensure that high school (HS) events are not incorrectly associated with middle school (MS) events during parsing. The logic now gracefully skips HS section headers, preventing any fuzzy matching from leading to incorrect associations. Additionally, a new unit test has been added to verify that HS occurrences are correctly excluded from MS event occurrences, ensuring the integrity of the parsing process.
This commit is contained in:
@@ -513,7 +513,8 @@ public class EventOccurrenceParserIssues_Tests
|
||||
public void Parse_SectionHeader_WithHyphen_IsRecognized()
|
||||
{
|
||||
// Arrange
|
||||
var testContent = "Architectural Design - HS\n" +
|
||||
// Test that section headers with hyphens are recognized (using MS event since HS events are skipped)
|
||||
var testContent = "Architectural Design - MS\n" +
|
||||
"Submit Entry March 15 8:00 a.m. Room 1";
|
||||
var tempFile = EventOccurrenceParserTestHelpers.CreateTempFile(testContent);
|
||||
var events = new[] { EventOccurrenceParserTestHelpers.CreateTestEvent("Architectural Design") };
|
||||
|
||||
Reference in New Issue
Block a user