public XDocument GenerateResults()
 {
     var poi = new MockData().MakeTestPoi();
     var serializer = new Serializer();
     serializer.Serialize(new Results(new List<Poi> {poi}));
     return serializer.Serialize(new Results(new List<Poi> { poi })); 
 }
 public void Serialize_OneLoadedPois_ReturnsXDocumentWithLoadedPoiNode()
 {
     var serializer = new Serializer();
     var mock = new MockData();
     var doc = serializer.Serialize(mock.MakeResult(mock.MakeTestPoi()));
     doc.Root.Descendants().Where(n => n.Name.LocalName == "poi").Should().HaveCount(1);
 }
 public void Serialize_TwoPois_ReturnsXDocumentWithTwoPoiNodes()
 {
     var serializer = new Serializer();
     var doc = serializer.Serialize(new MockData().MakeResultWithTwoEmptyPois());
     doc.Root.Descendants().Where(n => n.Name.LocalName == "poi").Should().HaveCount(2);
 }
 public void Serialize_SinglePoi_ReturnsXDocument()
 {
     var serializer = new Serializer();
     var doc = serializer.Serialize(new MockData().MakeResultWithOneEmptyPoi());
     doc.Should().BeOfType<XDocument>();
 }