public void ChallengeTwo_TestSituation4() { string input = "+7, +7, -2, -7, -4"; int result = DayOne.ComputeChallengeTwoResult(input); Assert.AreEqual(14, result); }
public void CallengeOne_TestSituation1() { string input = "+1, +1, +1"; int result = DayOne.ComputeChallengeOneResult(input); Assert.AreEqual(3, result); }
public void ChallengeTwo_TestSituation3() { string input = "-6, +3, +8, +5, -6"; int result = DayOne.ComputeChallengeTwoResult(input); Assert.AreEqual(5, result); }
public void testPartA_actual() { var sut = new DayOne(); var result = sut.PartA(); Assert.Equal("1029", result); }
public void CallengeOne_TestSituation3() { string input = "-1, -2, -3"; int result = DayOne.ComputeChallengeOneResult(input); Assert.AreEqual(-6, result); }
public void FindFirstDuplicateFrequency(string input, int expected) { var sut = new DayOne(); var result = sut.FindFirstDuplicateFrequency(input, 0); Assert.Equal(expected, result); }
public void TestPartTwo() { var expenses = GetExpensesFromFile(); var product = DayOne.GetListTriProduct(expenses, 2020); _output.WriteLine("Part Two Answer: {0}", product); }
public void testPartB_actual() { var sut = new DayOne(); var result = sut.PartB(); Assert.Equal("1220", result); }
public void PartA_Actual() { var sut = new DayOne(); var result = sut.PartA(); Assert.Equal("651651", result); }
public void testCircularInverseCaptcha(string input, int expected) { var sut = new DayOne(); var result = sut.CircularInverseCaptcha(input); Assert.Equal(expected, result); }
public void ChallengeTwo_TestSituation1() { string input = "+1, -1"; int result = DayOne.ComputeChallengeTwoResult(input); Assert.AreEqual(0, result); }
public void PartB_Actual() { var sut = new DayOne(); var result = sut.PartB(); Assert.Equal("214486272", result); }
public void testInverseCaptchaViaSum(string input, int expected) { var sut = new DayOne(); var result = sut.InverseCaptchaViaSum(input); Assert.Equal(expected, result); }
public void testDetermineFirstRepeatLocation() { var sot = new DayOne(); var result = sot.DetermineFirstRepeatLocation("R8, R4, R4, R10"); Assert.Equal(4, result); }
public void testDetermineDistanceTraveled(int expected, string input) { var sot = new DayOne(); var result = sot.DetermineDistanceTraveled(input); Assert.Equal(expected, result); }
protected async Task ShowResults() { if (ValidateTextbox()) { invalid = false; DayOne _challengeSolver = new DayOne(sumNumber); _partOne = new ValidEntries(); _partTwo = new ValidEntries(); await RefreshReport(); if (_expenseReport.Count > 0) { _partOne = _challengeSolver.PartOne(_expenseReport); _partTwo = _challengeSolver.PartTwo(_expenseReport); } if (_partOne != null && _partTwo != null) { childOne.Show(); childTwo.Show(); } else { invalid = true; } } else { invalid = true; } }
public void testWithActualPartA() { var sot = new DayOne(); var result = sot.DetermineDistanceTraveled(DayOne.PUZZLE_INPUT); Assert.Equal(273, result); }
public void testWithActualPartB() { var sot = new DayOne(); var result = sot.DetermineFirstRepeatLocation(DayOne.PUZZLE_INPUT); Assert.Equal(115, result); }
public void ChangeFrequency(string input, int expected) { var sut = new DayOne(); var result = sut.ChangeFrequency(input, 0); Assert.Equal(expected, result); }
//public static IDataStore DataStore { get; set; } //public static Color NavTint //{ // get { return AppSettings.ColorMainApp; } //} //public static Color HeaderTint //{ // get { return AppSettings.ColorMainApp; } //} //public static IDataStore Initialize(IDataCache cache, INetworkMonitor networkMonitor) //{ // return DataStore = new JsonDataStore(cache, AppSettings.Log, networkMonitor); //} public App() { //var CurrentDate = DateTime.Now.Date; DayOne = DateTime.Parse(DayOneString); DayOne = DayOne.Date; var dayTwo = DayOne.AddDays(1).Date; var currentDate = DateTime.Now.Date; if (currentDate < DayOne) { CurrentDayType = DayTypes.Unknown; } else if (currentDate == DayOne) { CurrentDayType = DayTypes.Day1; } else if (currentDate == dayTwo) { CurrentDayType = DayTypes.Day2; } else { CurrentDayType = DayTypes.Unknown; } MainPage = GetMainPage(); }
public void BasicCasesPass() { var dayOne = new DayOne(); Assert.AreEqual(dayOne.Solve("12"), 2m); Assert.AreEqual(dayOne.Solve("14"), 2m); Assert.AreEqual(dayOne.Solve("1969"), 654m); }
public void Test4() { const int Expected = 5; var input = new[] { -6, +3, +8, +5, -6 }; var actual = DayOne.FirstDuplicate(input); Assert.Equal(Expected, actual); }
public void Test3() { const int Expected = 0; var input = new[] { +1, +1, -2 }; var actual = DayOne.Calibrate(input); Assert.Equal(Expected, actual); }
public void Test5() { const int Expected = 14; var input = new[] { +7, +7, -2, -7, -4 }; var actual = DayOne.FirstDuplicate(input); Assert.Equal(Expected, actual); }
public void Test4() { const int Expected = -6; var input = new[] { -1, -2, -3 }; var actual = DayOne.Calibrate(input); Assert.Equal(Expected, actual); }
public void Solution() { const int Expected = 561; var input = Resources.InputD1P1.Split(Environment.NewLine).Select(int.Parse).ToArray(); var actual = DayOne.Calibrate(input); Assert.Equal(Expected, actual); }
public void Test2() { const int Expected = 0; var input = new[] { +1, -1 }; var actual = DayOne.FirstDuplicate(input); Assert.Equal(Expected, actual); }
public void FindReportSumTwo() { var input = new List <int>() { 1721, 979, 366, 299, 675, 1456 }; var sut = new DayOne(); var result = sut.FindReportSumTwo(input); Assert.Equal(514579, result); }
static void Main() { DayOne.TaskOne(); DayOne.TaskTwo(); DayTwo.TaskOne(); DayTwo.TaskTwo(); DayThree.TaskOne(); DayThree.TaskTwo(); DayFour.TaskOne(); DayFour.TaskTwo(); DaySix.TaskOne(); DaySix.TaskTwo(); Console.Read(); }
public void PartTwo() { var dayOne = new DayOne(); var output = dayOne.PartTwo(inputFile); }