Fix a few unit tests
This commit is contained in:
@@ -29,6 +29,7 @@ namespace Core.Calculation
|
|||||||
_eventPickCounts = new int[_allEvents.Length];
|
_eventPickCounts = new int[_allEvents.Length];
|
||||||
_preAssigned = new List<EventAssignment>();
|
_preAssigned = new List<EventAssignment>();
|
||||||
_droppedEvents = new List<CompetitiveEvent>();
|
_droppedEvents = new List<CompetitiveEvent>();
|
||||||
|
_includedEvents = new List<CompetitiveEvent>();
|
||||||
for (var i = 0; i < _events.Count; i++)
|
for (var i = 0; i < _events.Count; i++)
|
||||||
{
|
{
|
||||||
var e = _events[i];
|
var e = _events[i];
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ public class AssignmentAssumptionParser : CsvParserBase
|
|||||||
var studentColumns =
|
var studentColumns =
|
||||||
CsvReader.HeaderRecord.Select(h => h.Trim()).Where(h => !string.IsNullOrEmpty(h)).ToArray();
|
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())
|
while (CsvReader.Read())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "Web\Web.csproj", "{855D693D-16FF-4C4A-AD3C-74A6B21ADB72}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "Web\Web.csproj", "{855D693D-16FF-4C4A-AD3C-74A6B21ADB72}"
|
||||||
EndProject
|
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
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
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}.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.ActiveCfg = Release|Any CPU
|
||||||
{855D693D-16FF-4C4A-AD3C-74A6B21ADB72}.Release|Any CPU.Build.0 = 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
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ public class AssignmentAssumption_Tests
|
|||||||
var eventAssumptions = TestEntityHandler.GetEventAssumptions(competitiveEvents, students);
|
var eventAssumptions = TestEntityHandler.GetEventAssumptions(competitiveEvents, students);
|
||||||
|
|
||||||
foreach (var ea in eventAssumptions)
|
foreach (var ea in eventAssumptions)
|
||||||
{
|
{
|
||||||
|
if (ea.Student == null)
|
||||||
|
continue;
|
||||||
Console.WriteLine($"{ea.Assumption,10} {ea.Event.ShortName, -20} {ea.Student.FirstName}");
|
Console.WriteLine($"{ea.Assumption,10} {ea.Event.ShortName, -20} {ea.Student.FirstName}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user