Fix a few unit tests

This commit is contained in:
2025-08-15 11:05:38 -04:00
parent cf32cfcbcd
commit d4c46ae0fe
4 changed files with 7 additions and 16 deletions
+1
View File
@@ -29,6 +29,7 @@ namespace Core.Calculation
_eventPickCounts = new int[_allEvents.Length];
_preAssigned = new List<EventAssignment>();
_droppedEvents = new List<CompetitiveEvent>();
_includedEvents = new List<CompetitiveEvent>();
for (var i = 0; i < _events.Count; i++)
{
var e = _events[i];
+3 -1
View File
@@ -17,7 +17,9 @@ public class AssignmentAssumptionParser : CsvParserBase
var studentColumns =
CsvReader.HeaderRecord.Select(h => h.Trim()).Where(h => !string.IsNullOrEmpty(h)).ToArray();
var studentArray = studentColumns.Select(c => students.First(s => s.FirstName == c)).ToArray();
var studentArray =
studentColumns
.Select(c => students.FirstOrDefault(s => s.FirstName == c)).ToArray();
while (CsvReader.Read())
{
-14
View File
@@ -8,10 +8,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "Web\Web.csproj", "{855D693D-16FF-4C4A-AD3C-74A6B21ADB72}"
EndProject
Project("{54A90642-561A-4BB1-A94E-469ADEE60C69}") = "app.client", "App\app.client\app.client.esproj", "{B5C2BB9C-648A-1696-315D-CC0E08D4256C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App.Server", "App\App.Server\App.Server.csproj", "{3548E169-4440-4259-8E0F-7210D12D7C40}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -30,16 +26,6 @@ Global
{855D693D-16FF-4C4A-AD3C-74A6B21ADB72}.Debug|Any CPU.Build.0 = Debug|Any CPU
{855D693D-16FF-4C4A-AD3C-74A6B21ADB72}.Release|Any CPU.ActiveCfg = Release|Any CPU
{855D693D-16FF-4C4A-AD3C-74A6B21ADB72}.Release|Any CPU.Build.0 = Release|Any CPU
{B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Release|Any CPU.Build.0 = Release|Any CPU
{B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Release|Any CPU.Deploy.0 = Release|Any CPU
{3548E169-4440-4259-8E0F-7210D12D7C40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3548E169-4440-4259-8E0F-7210D12D7C40}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3548E169-4440-4259-8E0F-7210D12D7C40}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3548E169-4440-4259-8E0F-7210D12D7C40}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+3 -1
View File
@@ -10,7 +10,9 @@ public class AssignmentAssumption_Tests
var eventAssumptions = TestEntityHandler.GetEventAssumptions(competitiveEvents, students);
foreach (var ea in eventAssumptions)
{
{
if (ea.Student == null)
continue;
Console.WriteLine($"{ea.Assumption,10} {ea.Event.ShortName, -20} {ea.Student.FirstName}");
}