Exemplo n.º 1
0
        public void PrintPlateWithInnerPlatesTest()
        {
            var ruler = new Rule {StartValue = 950, EndValue = 775};
            var egypt = new Block {Ruler = ruler, Title = "Egypt"};
            var israel = new Block {Ruler = ruler, Title = "Israel"};
            var damascus = new Block {Ruler = ruler, Title = "Damascus"};
            var assyria = new Block {Ruler = ruler, Title = "Assyria"};

            var northKingdom = new Block {StartValue = 922, EndValue = 775, Ruler = ruler, Title = "Israel"};
            var southKingdom = new Block {StartValue = 922, EndValue = 775, Ruler = ruler, Title = "Judea"};

            egypt.AddEntry(new Entry {StartValue = 935, Text = "XXII Dyn. 935-725",Location = PrintLocation.Left});
            egypt.AddEntry(new Entry { StartValue = 935, EndValue = 914, Text = "Shishak 935-914",Location = PrintLocation.Right});
            egypt.AddEntry(new Entry {StartValue = 914, EndValue = 874, Text = "Osorkon I 914-874"});

            israel.AddEntry(new Entry {StartValue = 940,Text="Solomon 961-922"});

            southKingdom.AddEntry(new Entry {StartValue = 922, Text = "Rehoboam 922-915"});
            southKingdom.AddEntry(new Entry {StartValue = 915, Text = "Abijah 915-913"});

            northKingdom.AddEntry(new Entry {StartValue = 922, Text = "Jeroboam I 922-901"});

            israel.AddInnerBlock(southKingdom);
            israel.AddInnerBlock(northKingdom);

            damascus.AddEntry(new Entry {StartValue = 930, Text = "Rezon"});

            assyria.AddEntry(new Entry {StartValue = 935, Text = "Asshur-dan II 935-913"});

            var testSubject = new Plate() {Name = "Near East", Ruler = ruler};
            testSubject.AddBlock(egypt);
            testSubject.AddBlock(israel);
            testSubject.AddBlock(damascus);
            testSubject.AddBlock(assyria);

            var testResult = testSubject.ToString();

            System.Diagnostics.Debug.WriteLine(testResult);
        }
Exemplo n.º 2
0
        public void PrintPlateTest()
        {
            var testRuler = new Rule() { EndValue = 575, StartValue = 775 };
            var testBlock1 = new Block() { EndValue = 575, StartValue = 775, Title = "Judah", Ruler = testRuler };
            var testBlock2 = new Block() {EndValue = 575, StartValue = 775, Title = "Egypt", Ruler = testRuler};

            testBlock1.AddEntry(new Entry()
                                {
                                    Text = "Uzziah 783-742",
                                    StartValue = 765,
                                    EndValue = 765,
                                });
            testBlock1.AddEntry(new Entry()
                                {
                                    Text = "(Jotham coregent 750)",
                                    StartValue = 750,
                                    EndValue = 750,
                                    Location = PrintLocation.Right
                                });
            testBlock1.AddEntry(new Entry()
                                {
                                    Text = "Jotham 742-735",
                                    StartValue = 742,
                                    EndValue = 742,
                                });
            testBlock1.AddEntry(new Entry()
            {
                EndValue = 687,
                StartValue = 732,
                Text = "(Isaiah)",
                Location = PrintLocation.Center
            });
            testBlock1.AddEntry(new Entry()
            {
                EndValue = 702,
                StartValue = 733,
                Text = "(Micah)",
                Location = PrintLocation.Right
            });
            testBlock1.AddEntry(new Entry() { EndValue = 735, StartValue = 735, Text = "Ahaz 735-715" });
            testBlock1.AddEntry(new Entry()
            {
                EndValue = 715,
                StartValue = 715,
                Text = "Hezekiah 715-687"
            });

            testBlock2.AddEntry(new Entry()
                                {
                                    Text = "XXII Dyn. 935-725",
                                    StartValue = 935,
                                    EndValue = 725,
                                    Location = PrintLocation.Left
                                });
            testBlock2.AddEntry(new Entry()
            {
                Text = "XXIV Dyn. 725-709",
                StartValue = 725,
                EndValue = 709,
            });

            testBlock2.AddEntry(new Entry() {Text = "Neco II 610-594", StartValue = 610, EndValue = 610});

            var testSubject = new Plate() {Ruler = testRuler, Name = "Near East"};

            testSubject.AddBlock(testBlock1);
            testSubject.AddBlock(testBlock2);

            var testResult = testSubject.ToString();

            Assert.IsNotNull(testResult);

            System.Diagnostics.Debug.WriteLine(testResult);
        }
Exemplo n.º 3
0
        public void PlateSplitBlockTest()
        {
            var rule = new Rule() {StartValue = 2050, EndValue = 1500};
            var mesopotamia = new Block() {Ruler = rule, Title = "Mesopotamia"};
            mesopotamia.AddEntry(new Entry(){StartValue = 2060, EndValue = 1950, Text = "Ur III: ca. 2060-1950"});
            var assyria =  new Block(){Ruler = rule, StartValue = 1950, EndValue = 1550, Title = "Assyria"};
            var babylon = new Block {Ruler = rule, StartValue = 1830, EndValue = 1530, Title = "I Babylon"};
            var kassite = new Block {Ruler = rule, StartValue = 1650, EndValue = 1500, Title = "Kassite Dyn."};
            mesopotamia.AddInnerBlock(assyria);
            mesopotamia.AddInnerBlock(babylon);
            mesopotamia.AddInnerBlock(kassite);

            mesopotamia.AddArrow(new Arrow(babylon,assyria) {StartValue = 1728,Text = "Hammurabi"});

            var hittites = new Block {Ruler = rule, Title = "Hittites"};
            var palestine = new Block() {Ruler = rule, Title = "Palestine"};
            var egypt = new Block() {Ruler = rule, Title = "Egypt"};

            var plate = new Plate() {Name = "Near East 2050-1500", Ruler = rule};
            plate.AddBlock(mesopotamia);
            plate.AddBlock(hittites);
            plate.AddBlock(palestine);
            plate.AddBlock(egypt);

            var testResult = plate.ToString();

            System.Diagnostics.Debug.WriteLine(testResult);
        }
Exemplo n.º 4
0
        public void PlateToStringWithNotesTest()
        {
            var ruler = new Rule() {StartValue = 525, EndValue = 310};
            var greece = new Block() {Ruler = ruler, Title = "Greece"};
            greece.AddEntry(new Entry(){StartValue = 500, Text = "Ionian revolt", Location = PrintLocation.Right});
            greece.AddEntry(new Entry() {StartValue = 490, Text = "Battle of Marathon"});
            greece.AddEntry(new Entry(){StartValue = 480, Text = "Battle of Thermopyle / Salamis"});
            greece.AddEntry(new Entry(){StartValue = 479, Text ="Battle of Plataea"});
            greece.AddEntry(new Entry(){StartValue = 450, Text = "Peace of Callias"});
            greece.AddEntry(new Entry(){StartValue = 440, Text = "Parthenon built"});
            greece.AddEntry(new Entry(){StartValue = 431,EndValue = 404,Text = "Peloponnesian War"});
            greece.AddEntry(new Entry(){StartValue = 400,Text = "Athens return of self-rule"});
            greece.AddEntry(new Entry(){StartValue = 390,Text ="Corinthian War"});
            greece.AddEntry(new Entry(){StartValue = 338, Text = "Battle of Chaeronea"});
            greece.AddEntry(new Entry(){StartValue = 336, Text = "Phillip II rules all Greece"});
            greece.AddEntry(new Entry() { StartValue = 460, EndValue = 429, Text = "Pericles" });
            greece.AddEntry(new Entry(){StartValue = 323, Text = "Alexander & Fall of Persian Empire"});
            greece.AddEntry(new Entry() { StartValue = 500, EndValue = 325, Text = "Classical Period", Location = PrintLocation.Left });

            var plate = new Plate() {Name = "Classical Period", Ruler = ruler};
            plate.AddBlock(greece);

            var testResult = plate.ToString();

            Assert.IsNotNull(testResult);

            System.Diagnostics.Debug.WriteLine(testResult);
        }
Exemplo n.º 5
0
        public void TextAfterBlockEnd()
        {
            var rule = new Rule() { StartValue = 780, EndValue = 500, RuleLineSpacing = 7 };
            var judah = new Block() { Ruler = rule, Title = "Judah", StartValue = 780, EndValue = 587 };
            judah.AddEntry(560, "Exile");

            var plate = new Plate() { Ruler = rule, Name = "Mid-Eighth to Fifth Centuries BCE" };

            plate.AddBlock(judah);

            System.Diagnostics.Debug.WriteLine(plate.ToString());
        }