コード例 #1
0
 public void SetUp()
 {
     DataTable activitiesSummaryTable = new DataTable("ActivitiesSummary");
     activitiesSummaryTable.Columns.Add("Task");
     activitiesSummaryTable.Columns.Add("Spent", TimeSpan.Zero.GetType());
     ITaskCollection taskCollection = NewMock<ITaskCollection>();
     Stub.On(taskCollection).Method("IsWorking").With("Work").Will(Return.Value(true));
     Stub.On(taskCollection).Method("IsWorking").With("Rest").Will(Return.Value(false));
     tasksSummary = new TasksSummary(activitiesSummaryTable,taskCollection);
 }
コード例 #2
0
        public void SetSummaryPeriod(DateTime from, DateTime to)
        {
            activitiesSummary.TimeLogs = TimeLogsManager.GetTimeLogs(from, to);
            TasksSummary goodTasksSummary = tasksSummary as TasksSummary;

            if (goodTasksSummary != null)
            {
                goodTasksSummary.Calculate();
            }
        }
コード例 #3
0
ファイル: TasksSummaryTest.cs プロジェクト: EugeneBA/lazycure
        public void SetUp()
        {
            DataTable activitiesSummaryTable = new DataTable("ActivitiesSummary");

            activitiesSummaryTable.Columns.Add("Task");
            activitiesSummaryTable.Columns.Add("Spent", TimeSpan.Zero.GetType());
            ITaskCollection taskCollection = NewMock <ITaskCollection>();

            Stub.On(taskCollection).Method("IsWorking").With("Work").Will(Return.Value(true));
            Stub.On(taskCollection).Method("IsWorking").With("Rest").Will(Return.Value(false));
            tasksSummary = new TasksSummary(activitiesSummaryTable, taskCollection);
        }