public HomeModule() { Get["/"] = _ => { return View["index.cshtml"]; }; Post["/result"] = _ => { string dateToConvert = Request.Form["date-string"]; dateToConvert = dateToConvert.Substring(5, 2) + dateToConvert.Substring(8, 2) + dateToConvert.Substring(0, 4); Finder newDateToFind = new Finder(); string newDateToDay = newDateToFind.Find(dateToConvert); return View["result.cshtml", newDateToDay]; }; }
public void Find_10102016_Monday() { Finder f = new Finder(); Assert.Equal("Monday", f.Find("10102016")); }
public void Find_02021900_Friday() { Finder f = new Finder(); Assert.Equal("Friday", f.Find("02021900")); }
public void Find_10102000_Tuesday() { Finder f = new Finder(); Assert.Equal("Tuesday", f.Find("10102000")); }
public void Find_10101965_Sunday() { Finder f = new Finder(); Assert.Equal("Sunday", f.Find("10101965")); }
public void Find_10101900_Wednesday() { Finder f = new Finder(); Assert.Equal("Wednesday", f.Find("10101900")); }
public void Find_02022016_Tuesday() { Finder f = new Finder(); Assert.Equal("Tuesday", f.Find("02022016")); }
public void Find_02022000_Wednesday() { Finder f = new Finder(); Assert.Equal("Wednesday", f.Find("02022000")); }