Exemplo n.º 1
0
        private void Setup()
        {
            _withoutNamespaceDeclarationsXml = new XmlSanitizer().Sanitize(TestConstants.RawGarminXmlWith5TrackPoints);
            var xDoc = XDocument.Parse(_withoutNamespaceDeclarationsXml);
            xDoc.Descendants(ActivityBuilder.LapName).Remove();
            _emptyActivityXml = xDoc.ToString(SaveOptions.None);
            xDoc.Descendants(ActivityBuilder.ActivityName).Remove();
            _emptyXml = xDoc.ToString(SaveOptions.None);

            _activityBuilder = new ActivityBuilder(_withoutNamespaceDeclarationsXml);
            _activityBuilder.Build();
        }
Exemplo n.º 2
0
        public void AssertCanBuildEmptyActivity()
        {
            var e = new ActivityBuilder(_emptyActivityXml);
            e.Build();

            Assert.NotNull(e.Activity);
            Assert.AreEqual(0, e.Laps.Count);
        }