public void ToXmlTest()
 {
     var bob = new Person { Name = "Bob", Age = 43 };
     var xml = bob.ToXml();
     var flattened = xml.FlattenXml();
     flattened.ShouldEqual(
         new Tuple<XmlNodeType,string>(XmlNodeType.XmlDeclaration, "xml"),
         new Tuple<XmlNodeType, string>(XmlNodeType.Element, "Person"),
         new Tuple<XmlNodeType, string>(XmlNodeType.Element, "Name"),
         new Tuple<XmlNodeType, string>(XmlNodeType.Text, "Bob"),
         new Tuple<XmlNodeType, string>(XmlNodeType.EndElement, "Name"),
         new Tuple<XmlNodeType, string>(XmlNodeType.Element, "Age"),
         new Tuple<XmlNodeType, string>(XmlNodeType.Text, "43"),
         new Tuple<XmlNodeType, string>(XmlNodeType.EndElement, "Age"),
         new Tuple<XmlNodeType, string>(XmlNodeType.EndElement, "Person")
         );
 }
        public void DistinctTest()
        {
            var oldBob = new Person { Name = "Bob", Age = 70 };
            var youngBob = new Person { Name = "Bob", Age = 17 };
            var rob = new Person { Name = "Rob", Age = 30 };
            var people = new List<Person> { oldBob, youngBob, rob };
            var peopleWithDifferentNames = people.Distinct(person => person.Name);

            peopleWithDifferentNames.ShouldNumber(2);
        }