public void LunchBreakTest02_NowIsNotLunchBreak() { using (new PDateTimeContext.NowGet()) using (new ConsoleContext()) using (var sw = new StringWriter()) { Console.SetOut(sw); PDateTime.NowGet.Body = () => new DateTime(2011, 12, 13, 13, 00, 00); LifeInfo.LunchBreak(); Assert.AreEqual("時刻: 13\tお仕事なう・・・" + sw.NewLine, sw.ToString()); } }
static void Main(string[] args) { LifeInfo.LunchBreak(); LifeInfo.Holiday(); }