public void DateRangeConstructorTest()
 {
     DateTime start = new DateTime(2013, 5, 18);
     DateTime finish = new DateTime(2013, 5, 19);
     DateRange target = new DateRange(start, finish);
     Assert.IsInstanceOfType(target, typeof(DateRange));
     Assert.AreEqual(target.StartTime, start);
     Assert.AreEqual(target.FinishTime, finish);
 }
        public void DisplayTest()
        {
            IssuePriorityGraph target = new IssuePriorityGraph(); // TODO: Initialize to an appropriate value
            Project project = BuildDefaultProject();
            DateRange range = new DateRange(DateTime.Now.Subtract(TimeSpan.FromDays(10)), DateTime.Now);
            AddIssues(project, 8, 2, 0);

            Control actual = target.Display(project, range);
            Assert.IsInstanceOfType(actual, typeof(Chart));

            Chart chart = actual as Chart;
            Assert.AreEqual(1, chart.Series.Count);
            Assert.AreEqual(3, chart.Series[0].Points.Count);
            Assert.AreEqual(8, chart.Series[0].Points[0].YValues[0]);
            Assert.AreEqual(2, chart.Series[0].Points[1].YValues[0]);
            Assert.AreEqual(0, chart.Series[0].Points[2].YValues[0]);
            Assert.AreEqual(1, chart.Legends.Count);
            Assert.AreEqual(1, chart.Titles.Count);
        }
        public void EvaluateProjectTest()
        {
            IssuePriorityGraph_Accessor target = new IssuePriorityGraph_Accessor();
            Project project = BuildDefaultProject();
            DateRange range = new DateRange(DateTime.Now, DateTime.Now);
            List<Series> actual = target.EvaluateProject(project, range);
            Assert.AreEqual(1, actual.Count);
            Assert.AreEqual(3, actual[0].Points.Count);
            Assert.AreEqual(0, actual[0].Points[0].YValues[0]);
            Assert.AreEqual(0, actual[0].Points[1].YValues[0]);
            Assert.AreEqual(0, actual[0].Points[1].YValues[0]);

            AddIssues(project, 3, 7, 2);
            actual = target.EvaluateProject(project, range);

            Assert.AreEqual(3, actual[0].Points[0].YValues[0]);
            Assert.AreEqual(7, actual[0].Points[1].YValues[0]);
            Assert.AreEqual(2, actual[0].Points[2].YValues[0]);
        }
        public void DisplayTest()
        {
            IssuesByUserGraph target = new IssuesByUserGraph();
            Project project = new Project(1, "Test", DateTime.Now, DateTime.Now.AddDays(1), "", "", "", DateTime.Now.AddDays(1));
            DateRange range = new DateRange(DateTime.Now.Subtract(TimeSpan.FromDays(10)), DateTime.Now);

            Control actual = target.Display(project, range);
            Assert.IsInstanceOfType(actual, typeof(Chart));

            Chart chart = actual as Chart;
            Assert.AreEqual(1, chart.Series.Count);
            Assert.AreEqual(0, chart.Series[0].Points.Count);
            Assert.AreEqual(1, chart.Legends.Count);
            Assert.AreEqual(1, chart.Titles.Count);
        }
 public void EvaluateProjectTest()
 {
     IssuesByUserGraph_Accessor target = new IssuesByUserGraph_Accessor(); // TODO: Initialize to an appropriate value
     Project project = new Project(1, "Test", DateTime.Now, DateTime.Now.AddDays(1), "", "", "", DateTime.Now.AddDays(1));
     DateRange range = new DateRange(DateTime.Now, DateTime.Now);
     List<Series> actual = target.EvaluateProject(project, range);
     Assert.AreEqual(1, actual.Count);
     Assert.AreEqual(0, actual[0].Points.Count);
 }
 public void InvalidDateRangeConstructorTest()
 {
     DateTime start = new DateTime(2013, 5, 19);
     DateTime finish = new DateTime(2013, 5, 18);
     DateRange target = new DateRange(start, finish);
 }