public void EditTickMarkTest()
        {
            TimeLine tline = new TimeLine("Test");
            List<TickMark> ticklist = tline.GetTicks();
            TickMark tick =  ticklist.First();

            Assert.AreEqual(0, tick.GetXPlacement());
            tick.EditTickLocation(100, tline.GetID());
            Assert.AreEqual(100, tick.GetXPlacement());

            Assert.AreEqual("Test", tick.GetName());
            tick.EditTickName("NewName", tline.GetID());
            Assert.AreEqual("NewName", tick.GetName());

            TimeLine testline = new TimeLine("Test");
            List<TickMark> testticklist = testline.GetTicks();
            TickMark testtick = testticklist.First();

            Assert.AreEqual(100, testtick.GetXPlacement());
            Assert.AreEqual("NewName", testtick.GetName());

            tick.EditTickName("Test", tline.GetID());
            tick.EditTickLocation(0, tline.GetID());
            Assert.AreEqual(0, tick.GetXPlacement());
            Assert.AreEqual("Test", tick.GetName());
        }
        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());
        }
Beispiel #3
0
        public void RoadMapTest()
        {
            RoadMap map = new RoadMap("Test");

            Assert.AreEqual("TEST", map.GetDecription());
            Assert.AreEqual("Test", map.GetName());
            Assert.AreEqual("10/6/2015 1:53:46 PM", map.GetTimeStamp().ToString());
            Assert.AreEqual("123", map.GetUser().GetUserName());

            TimeLine timeline = new TimeLine("Test");
            TimeLine test = map.GetTimeline();

            Assert.AreEqual( timeline.GetID(), test.GetID());

            StrategyPoint sp = new StrategyPoint("Test", "TEST");
            List<StrategyPoint> spTest = map.GetStrategyPoints();

            Assert.AreEqual(sp.GetName(), spTest.First().GetName());
        }