示例#1
0
 public void LunchBreakTest02_NowIsNotHoliday()
 {
     using (new PDateTimeContext.NowGet())
         using (new ConsoleContext())
             using (var sw = new StringWriter())
             {
                 Console.SetOut(sw);
                 PDateTime.NowGet.Body = () => new DateTime(2011, 12, 19, 00, 00, 00);
                 LifeInfo.Holiday();
                 Assert.AreEqual("曜日: Monday\tお仕事なう・・・" + sw.NewLine, sw.ToString());
             }
 }
示例#2
0
 public void LunchBreakTest01_NowIsHoliday()
 {
     using (new PDateTimeContext.NowGet())
         using (new ConsoleContext())
             using (var sw = new StringWriter())
             {
                 Console.SetOut(sw);
                 PDateTime.NowGet.Body = () => new DateTime(2011, 12, 18, 00, 00, 00);
                 LifeInfo.Holiday();
                 Assert.Equal("曜日: Sunday\t休日なう!" + sw.NewLine, sw.ToString());
             }
 }
示例#3
0
 static void Main(string[] args)
 {
     LifeInfo.LunchBreak();
     LifeInfo.Holiday();
 }