Ejemplo n.º 1
0
 private void CompareTasks( Task[] tasks, Task[] tasks2 )
 {
     Assert.AreEqual( tasks.Length, tasks2.Length, "we should get the same tasks back" );
     for( int i = 0; i < tasks.Length; i++ )
     {
         CompareTasks( tasks[ i ], tasks2[ i ] );
     }
 }
Ejemplo n.º 2
0
 private void CompareTasks( Task task, Task task_2 )
 {
     Assert.AreEqual( task.Id, task_2.Id, "wrong id" );
     Assert.AreEqual( task.Name, task_2.Name, "wrong Name" );
     Assert.AreEqual( task.CreatedAt, task_2.CreatedAt, "wrong CreatedAt" );
     Assert.AreEqual( task.CompletedAt, task_2.CompletedAt, "wrong CompletedAt" );
     Assert.AreEqual( task.Notes, task_2.Notes, "wrong Notes" );
 }
Ejemplo n.º 3
0
        public void PointlessTest()
        {
            Project project = new Project() { Id = 100 };
            Task task = new Task(){ Id = 100 };

            Assert.IsTrue( project is ITarget, "project should be a ITarget" );
            Assert.IsTrue( task is ITarget, "project should be a ITarget" );

            AssertITargetId( 100, project );
            AssertITargetId( 100, task );
        }
Ejemplo n.º 4
0
        public BusyTask( Task task )
        {
            this.Name = task.Name;
            this.CreatedAt = task.CreatedAt;
            this.CompletedAt = task.CompletedAt;

            if( this.CompletedAt.HasValue )
            {
                this.TimeTaken = Shared.ToRelativeTime( this.CompletedAt.Value - this.CreatedAt );
            }
            else
            {
                this.CurrentRunTime = Shared.ToRelativeTime( DateTime.UtcNow - this.CreatedAt );
            }
        }
Ejemplo n.º 5
0
 public Story[] GetStories( Task target, OptionalFields[] returnedFields = null )
 {
     return GetStories( target.Id, returnedFields );
 }