public void ConvertTrackback_WithInvalidSourceUrl_IgnoresUrl()
        {
            // arrange
            var trackback = new BlogMLTrackback {Url = "not-valid-url"};
            var mapper = new BlogMLImportMapper();

            // act
            var convertedTrackback = mapper.ConvertTrackback(trackback, "123");

            // assert
            Assert.AreEqual(null, convertedTrackback.SourceUrl);
        }
        public void ConvertTrackback_WithValidSourceUrl_SetsUrlAndAuthorUsingHostname()
        {
            // arrange
            var trackback = new BlogMLTrackback { Url = "http://example.com/valid-url" };
            var mapper = new BlogMLImportMapper();

            // act
            var convertedTrackback = mapper.ConvertTrackback(trackback, "123");

            // assert
            Assert.AreEqual(new Uri("http://example.com/valid-url"), convertedTrackback.SourceUrl);
            Assert.AreEqual("example.com", convertedTrackback.Author);
        }
        public void ConvertTrackback_ReturnsFeedbackItemAsPingTrack()
        {
            // arrange
            var trackback = new BlogMLTrackback();
            var mapper = new BlogMLImportMapper();

            // act
            var convertedTrackback = mapper.ConvertTrackback(trackback, "123");

            // assert
            Assert.AreEqual(FeedbackType.PingTrack, convertedTrackback.FeedbackType);
        }