コード例 #1
0
        public void EditTimeLineTest()
        {
            TimeLine timeline = new TimeLine("Test");

            DateTime test = DateTime.Now;

            timeline.EditStartDate(test, "test");
            Assert.AreEqual(test.ToString(), timeline.GetStartDate().ToString());
            timeline.EditEndDate(test, "test");
            Assert.AreEqual(test.ToString(), timeline.GetEndDate().ToString());

            TimeLine testtimeline = new TimeLine("test");

            Assert.AreEqual(test.ToString(), testtimeline.GetStartDate().ToString());
            Assert.AreEqual(test.ToString(), testtimeline.GetEndDate().ToString());

            timeline.EditStartDate(Convert.ToDateTime("1/1/1900 12:00:00 AM"), "test");
            Assert.AreEqual("1/1/1900 12:00:00 AM", timeline.GetStartDate().ToString());
            timeline.EditEndDate(Convert.ToDateTime("1/1/1900 12:00:00 AM"), "test");
            Assert.AreEqual("1/1/1900 12:00:00 AM", timeline.GetEndDate().ToString());
        }
コード例 #2
0
        public void TimeLineTest()
        {
            TimeLine timeline = new TimeLine("Test");
            TickMark tick = new TickMark("Test", 0);

            Assert.AreEqual(13, timeline.GetID());
            Assert.AreEqual(Convert.ToDateTime("1/1/1900 12:00:00 AM"), timeline.GetStartDate());
            Assert.AreEqual(Convert.ToDateTime("1/1/1900 12:00:00 AM"), timeline.GetEndDate());

            Assert.AreEqual(1, timeline.GetTicks().Count());

            TickMark first = timeline.GetTicks().First();
            Assert.AreEqual(tick.GetName(), first.GetName());
            Assert.AreEqual(tick.GetXPlacement(), first.GetXPlacement());
        }