From 273f4958b86e785d3a9e0b3f886881e0042e3a62 Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Mon, 30 Nov 2020 11:26:04 -0500 Subject: [PATCH] add unit-testing framework --- 2020/AdventOfCode.csproj | 6 ++++++ 2020/Program.cs | 18 ++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/2020/AdventOfCode.csproj b/2020/AdventOfCode.csproj index 1d2d39a..e54daa1 100644 --- a/2020/AdventOfCode.csproj +++ b/2020/AdventOfCode.csproj @@ -3,6 +3,12 @@ Exe net5.0 + false + + + + + diff --git a/2020/Program.cs b/2020/Program.cs index d5e011f..7357982 100644 --- a/2020/Program.cs +++ b/2020/Program.cs @@ -1,9 +1,23 @@ using System; +using static System.Console; +using System.Collections.Generic; +using Xunit; namespace AdventOfCode { - class Program { + + public class Program { + + static string Hello() { + return "ahoy, world"; + } + + [Fact] + static void HelloTest() { + Assert.Equal("ahoy, world", Hello()); + } + static void Main(string[] args) { - Console.WriteLine("Hello World!"); + Console.WriteLine(Hello()); } } }