You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.7 KiB
51 lines
1.7 KiB
using AOC2021.Test;
|
|
using AOC2021.Tests.Models;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using AOC2021.Models;
|
|
using AOC2021.Test.Models;
|
|
|
|
namespace AOC2021.Tests
|
|
{
|
|
[TestClass]
|
|
public class DayTest
|
|
{
|
|
private AOCTester _tester;
|
|
public DayTest()
|
|
{
|
|
_tester = new AOCTester();
|
|
}
|
|
|
|
[TestMethod]
|
|
public void Day1()
|
|
{
|
|
var request = new TestRequest() { Day = "day1", Answer = new Answer() { Day_A_Test = "7", Day_A_Input = "1759", Day_B_Test = "5", Day_B_Input = "1805" } };
|
|
var result = _tester.Test(request);
|
|
Assert.IsTrue(request.Answer.Equals(result.Answer));
|
|
}
|
|
|
|
[TestMethod]
|
|
public void Day2()
|
|
{
|
|
var request = new TestRequest() { Day = "day2", Answer = new Answer() { Day_A_Test = "150", Day_A_Input = "1762050", Day_B_Test = "900", Day_B_Input = "1855892637" } };
|
|
var result = _tester.Test(request);
|
|
Assert.IsTrue(request.Answer.Equals(result.Answer));
|
|
}
|
|
|
|
[TestMethod]
|
|
public void Day3()
|
|
{
|
|
var request = new TestRequest() { Day = "day3", Answer = new Answer() { Day_A_Test = "198", Day_A_Input = "3148794", Day_B_Test = "230", Day_B_Input = "2795310" } };
|
|
var result = _tester.Test(request);
|
|
Assert.IsTrue(request.Answer.Equals(result.Answer));
|
|
}
|
|
|
|
[TestMethod]
|
|
public void Day4()
|
|
{
|
|
var request = new TestRequest() { Day = "day4", Answer = new Answer() { Day_A_Test = "4512", Day_A_Input = "63424", Day_B_Test = "1924", Day_B_Input = "23541" } };
|
|
var result = _tester.Test(request);
|
|
Assert.IsTrue(request.Answer.Equals(result.Answer));
|
|
}
|
|
}
|
|
}
|