|
|
@ -15,24 +15,23 @@ namespace AOC2021.Test
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Console.WriteLine("Testing " + request.Day);
|
|
|
|
Console.WriteLine("Testing " + request.Day);
|
|
|
|
var response = new TestResponse() { Answer = new Models.Answer() };
|
|
|
|
var response = new TestResponse() { Answer = new Models.Answer() };
|
|
|
|
var day = GetAOCDay(request.Day);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var test = GetTextInput(request.Day, "test");
|
|
|
|
var test = GetTextInput(request.Day, "test");
|
|
|
|
var input = GetTextInput(request.Day, "input");
|
|
|
|
var input = GetTextInput(request.Day, "input");
|
|
|
|
|
|
|
|
|
|
|
|
Console.WriteLine($"Testing {request.Day} Part A, Test data");
|
|
|
|
Console.WriteLine($"Testing {request.Day} Part A, Test data");
|
|
|
|
if (!string.IsNullOrEmpty(request.Answer.Day_A_Test))
|
|
|
|
if (!string.IsNullOrEmpty(request.Answer.Day_A_Test))
|
|
|
|
response.Answer.Day_A_Test = day.ExecuteDay(new AOCRequest() { Input = test, Version = AOCVersion.A }).Answer;
|
|
|
|
response.Answer.Day_A_Test = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = test, Version = AOCVersion.A }).Answer;
|
|
|
|
Console.WriteLine($"Testing {request.Day} Part A, Input data");
|
|
|
|
Console.WriteLine($"Testing {request.Day} Part A, Input data");
|
|
|
|
if (!string.IsNullOrEmpty(request.Answer.Day_A_Input))
|
|
|
|
if (!string.IsNullOrEmpty(request.Answer.Day_A_Input))
|
|
|
|
response.Answer.Day_A_Input = day.ExecuteDay(new AOCRequest() { Input = input, Version = AOCVersion.A }).Answer;
|
|
|
|
response.Answer.Day_A_Input = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = input, Version = AOCVersion.A }).Answer;
|
|
|
|
|
|
|
|
|
|
|
|
Console.WriteLine($"Testing {request.Day} Part B, Test data");
|
|
|
|
Console.WriteLine($"Testing {request.Day} Part B, Test data");
|
|
|
|
if (!string.IsNullOrEmpty(request.Answer.Day_B_Test))
|
|
|
|
if (!string.IsNullOrEmpty(request.Answer.Day_B_Test))
|
|
|
|
response.Answer.Day_B_Test = day.ExecuteDay(new AOCRequest() { Input = test, Version = AOCVersion.B }).Answer;
|
|
|
|
response.Answer.Day_B_Test = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = test, Version = AOCVersion.B }).Answer;
|
|
|
|
Console.WriteLine($"Testing {request.Day} Part B, Input data");
|
|
|
|
Console.WriteLine($"Testing {request.Day} Part B, Input data");
|
|
|
|
if (!string.IsNullOrEmpty(request.Answer.Day_B_Input))
|
|
|
|
if (!string.IsNullOrEmpty(request.Answer.Day_B_Input))
|
|
|
|
response.Answer.Day_B_Input = day.ExecuteDay(new AOCRequest() { Input = input, Version = AOCVersion.B }).Answer;
|
|
|
|
response.Answer.Day_B_Input = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = input, Version = AOCVersion.B }).Answer;
|
|
|
|
return response;
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|