Ejemplo n.º 1
0
        public void SearchResultWithNoRescords()
        {
            SearchResult result = new SearchResult("<people></people>");

            Record[] records = new Record[0];
            Assert.AreEqual(records, result.Records());
        }
Ejemplo n.º 2
0
        public void SearchResultRecords()
        {
            SearchResult result = new SearchResult("<people><row><name>Tommy</name></row></people>");
            XmlDocument doc = new XmlDocument();

            XmlElement row = doc.CreateElement("row");
            XmlElement name = doc.CreateElement("name");
            name.InnerText = "Tommy";

            row.AppendChild(name);
            doc.AppendChild(row);
            Record[] records = new Record[] { new Record(doc.ChildNodes[0]) };

            Assert.AreEqual(records[0]["name"], result.Records()[0]["name"]);
        }