Ejemplo n.º 1
0
 public void SetUp()
 {
     activities = new List <IActivity>();
     timeLog    = NewMock <ITimeLog>();
     linker     = NewMock <ITaskActivityLinker>();
     Stub.On(timeLog).GetProperty("Data").Will(Return.Value(new DataTable()));
     Stub.On(timeLog).GetProperty("Activities").Will(Return.Value(activities));
     Stub.On(linker).Method("GetRelatedTaskName");
     activitiesSummary = new ActivitiesSummary(timeLog, linker);
 }
Ejemplo n.º 2
0
        public void GetRelatedTask()
        {
            ITimeLog timeLog = StubTimeLogWith(new Activity("first", DateTime.Now, sevenSec));
            linker = NewMock<ITaskActivityLinker>();
            Expect.AtLeastOnce.On(linker).Method("GetRelatedTaskName").With("first").Will(Return.Value("related task"));

            activitiesSummary = new ActivitiesSummary(timeLog,linker);
            activitiesSummary.Update();
            string task = activitiesSummary.Data.Rows[0]["Task"] as string;
            Assert.IsNotNull(task);
            Assert.AreEqual("related task", task);
        }
Ejemplo n.º 3
0
        public void GetRelatedTask()
        {
            ITimeLog timeLog = StubTimeLogWith(new Activity("first", DateTime.Now, sevenSec));

            linker = NewMock <ITaskActivityLinker>();
            Expect.AtLeastOnce.On(linker).Method("GetRelatedTaskName").With("first").Will(Return.Value("related task"));

            activitiesSummary = new ActivitiesSummary(timeLog, linker);
            activitiesSummary.Update();
            string task = activitiesSummary.Data.Rows[0]["Task"] as string;

            Assert.IsNotNull(task);
            Assert.AreEqual("related task", task);
        }
Ejemplo n.º 4
0
 public void SetUp()
 {
     activities = new List<IActivity>();
     timeLog = NewMock<ITimeLog>();
     linker = NewMock<ITaskActivityLinker>();
     Stub.On(timeLog).GetProperty("Data").Will(Return.Value(new DataTable()));
     Stub.On(timeLog).GetProperty("Activities").Will(Return.Value(activities));
     Stub.On(linker).Method("GetRelatedTaskName");
     activitiesSummary = new ActivitiesSummary(timeLog, linker);
 }