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 ] ); } }
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" ); }
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 ); }
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 ); } }
public Story[] GetStories( Task target, OptionalFields[] returnedFields = null ) { return GetStories( target.Id, returnedFields ); }