public void Test3_TestSundaysInOneMonth_String(string InlineData) { DayFinder test = new DayFinder(InlineData); test.Counter(); Assert.Equal("Sunday", test.GetDayOfWeek()); }
public void Test3_TestDaysAcrossMonth_String(string InlineData, string expectedResult) { DayFinder test = new DayFinder(InlineData); test.Counter(); Assert.Equal(expectedResult, test.GetDayOfWeek()); }
public void Test2_Counter_ReturnInt() { DayFinder test = new DayFinder("1/1/2000"); test.Counter(); Assert.Equal(36524, test.GetDaysSinceEpoch()); }
public void Test3_TestDaysAcrossYear_String(string InlineData, string expectedResult) { DayFinder test = new DayFinder(InlineData); test.Counter(); System.Console.WriteLine("Days since epoch: " + test.GetDaysSinceEpoch()); Assert.Equal(expectedResult, test.GetDayOfWeek()); }
public HomeModule() { Get["/"] = _ => View["index.cshtml"]; //Insert your GETs and POSTs here Post["/find-weekday"] = _ => { string date = Request.Form["date"]; DayFinder newDayFinder = new DayFinder(date); newDayFinder.Counter(); return(View["index.cshtml", newDayFinder.GetDayOfWeek()]); }; }