Ejemplo n.º 1
0
 public WorkingTimeForDay(ITimeLog timeLog, IWorkDefiner workDefiner)
 {
     TimeLog          = timeLog;
     this.workDefiner = workDefiner;
     CreateTable();
     FillTable();
 }
Ejemplo n.º 2
0
 public WorkingTimeForDay(ITimeLog timeLog, IWorkDefiner workDefiner)
 {
     TimeLog = timeLog;
     this.workDefiner = workDefiner;
     CreateTable();
     FillTable();
 }
Ejemplo n.º 3
0
        public void SetUp()
        {
            ITimeLog timeLog = NewMock <ITimeLog>();

            Stub.On(timeLog).GetProperty("Activities").Will(Return.Value(new List <IActivity>(
                                                                             new IActivity[] {
                new Activity("work", DateTime.Parse("9:00"), TimeSpan.Parse("4:00")),
                new Activity("rest", DateTime.Parse("14:30"), TimeSpan.Parse("3:30"))
            })));
            Stub.On(timeLog).GetProperty("Data").Will(Return.Value(new DataTable()));
            workDefiner = NewMock <IWorkDefiner>();
            Stub.On(workDefiner).Method("IsWorkingActivity").With("work").Will(Return.Value(true));
            Stub.On(workDefiner).Method("IsWorkingActivity").With("work1").Will(Return.Value(true));
            Stub.On(workDefiner).Method("IsWorkingActivity").With("work2").Will(Return.Value(true));
            Stub.On(workDefiner).Method("IsWorkingActivity").With("rest").Will(Return.Value(false));
            Stub.On(workDefiner).Method("IsWorkingActivity").With("dinner").Will(Return.Value(false));
            Stub.On(workDefiner).Method("IsWorkingActivity").With(string.Empty).Will(Return.Value(false));
            Stub.On(workDefiner).Method("IsWorkingActivity").With(null).Will(Return.Value(false));
            workingTime = new WorkingTimeForDay(timeLog, workDefiner);
        }
Ejemplo n.º 4
0
 public void SetUp()
 {
     ITimeLog timeLog = NewMock<ITimeLog>();
     Stub.On(timeLog).GetProperty("Activities").Will(Return.Value(new List<IActivity>(
         new IActivity[] {
             new Activity("work", DateTime.Parse("9:00"), TimeSpan.Parse("4:00")),
             new Activity("rest", DateTime.Parse("14:30"), TimeSpan.Parse("3:30"))
         })));
     Stub.On(timeLog).GetProperty("Data").Will(Return.Value(new DataTable()));
     workDefiner = NewMock<IWorkDefiner>();
     Stub.On(workDefiner).Method("IsWorkingActivity").With("work").Will(Return.Value(true));
     Stub.On(workDefiner).Method("IsWorkingActivity").With("work1").Will(Return.Value(true));
     Stub.On(workDefiner).Method("IsWorkingActivity").With("work2").Will(Return.Value(true));
     Stub.On(workDefiner).Method("IsWorkingActivity").With("rest").Will(Return.Value(false));
     Stub.On(workDefiner).Method("IsWorkingActivity").With("dinner").Will(Return.Value(false));
     Stub.On(workDefiner).Method("IsWorkingActivity").With(string.Empty).Will(Return.Value(false));
     Stub.On(workDefiner).Method("IsWorkingActivity").With(null).Will(Return.Value(false));
     workingTime = new WorkingTimeForDay(timeLog, workDefiner);
 }