public void SaveShouldCreateValidXmlFile()
        {
            var repo    = builder.Build();
            var contest = new ContestBuilder().Build();

            repo.Save(contest);
            // assert - can be parsed
            XDocument xdoc = XDocument.Parse(builder.SavedXml);

            // assert - has a TracksElement
            Assert.AreEqual(1, xdoc.Elements("Tracks").Count());
        }
        public void ATrackElementShouldExistForEachTrack()
        {
            var repo           = builder.Build();
            int numberOfTracks = 5;
            var contest        = new ContestBuilder().BuildWithTracks(numberOfTracks);

            repo.Save(contest);
            // assert - can be parsed
            XDocument xdoc = XDocument.Parse(builder.SavedXml);

            // assert - has a TracksElement
            Assert.AreEqual(numberOfTracks, xdoc.Element("Tracks").Elements("Track").Count());
        }