Exemplo n.º 1
0
        public void Test3_TestSundaysInOneMonth_String(string InlineData)
        {
            DayFinder test = new DayFinder(InlineData);

            test.Counter();
            Assert.Equal("Sunday", test.GetDayOfWeek());
        }
Exemplo n.º 2
0
        public void Test3_TestDaysAcrossMonth_String(string InlineData, string expectedResult)
        {
            DayFinder test = new DayFinder(InlineData);

            test.Counter();
            Assert.Equal(expectedResult, test.GetDayOfWeek());
        }
Exemplo n.º 3
0
        public void Test2_Counter_ReturnInt()
        {
            DayFinder test = new DayFinder("1/1/2000");

            test.Counter();
            Assert.Equal(36524, test.GetDaysSinceEpoch());
        }
Exemplo n.º 4
0
        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());
        }
Exemplo n.º 5
0
 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()]);
     };
 }