Beispiel #1
0
        public void GetOrchestraFromNodeItemTest()
        {
            var orchestraID   = Helper.CreateXElement(Constants.Orchestra.orchestraIDElement, "-1");
            var orchestraName = Helper.CreateXElement(Constants.Orchestra.orchestraNameElement, "TestOrchestraName");
            var orchestraURL  = Helper.CreateXElement(Constants.Orchestra.orchestraURLElement, "TestOrchestraURL");
            var orchestraNote = Helper.CreateXElement(Constants.Orchestra.orchestraNotesElement, "TestOrchestraNotes");
            var orchestraItem = new System.Xml.Linq.XElement(Constants.Orchestra.orchestraElement, orchestraID, orchestraName, orchestraURL, orchestraNote);
            var node          = new System.Xml.Linq.XElement(Constants.Event.eventElement, orchestraItem);

            Orchestra orchestra = Orchestra.GetOrchestraFromNode(node);

            Assert.IsNotNull(orchestra);
            Assert.IsTrue(orchestra.OrchestraID == -1 && orchestra.OrchestraName == "TestOrchestraName");
        }