public void GetNowPlayingResponseFromNavigator_MockResponse_AlbumArtistSet()
        {
            // Arrange
            var document = new XmlDocument();
            document.LoadXml(NowPlayingXml);
            var mockedNavigator = document.CreateNavigator();

            var api = new TrackApiUnderTest();

            // Act
            var response = api.GetNowPlayingResponseFromNavigatorUnderTest(mockedNavigator);

            // Assert
            Assert.AreEqual("Massive Attack (Album Artist)", response.Track.AlbumArtist);
        }
        public void GetNowPlayingResponseFromNavigator_MockResponse_TrackNameSet()
        {
            // Arrange
            var document = new XmlDocument();
            document.LoadXml(NowPlayingXml);
            var mockedNavigator = document.CreateNavigator();

            var api = new TrackApiUnderTest();

            // Act
            var response = api.GetNowPlayingResponseFromNavigatorUnderTest(mockedNavigator);

            // Assert
            Assert.AreEqual("Spying Glass", response.Track.TrackName);
        }
Ejemplo n.º 3
0
        public void GetNowPlayingResponseFromNavigator_MockResponse_AlbumArtistSet()
        {
            // Arrange
            var document = new XmlDocument();

            document.LoadXml(NowPlayingXml);
            var mockedNavigator = document.CreateNavigator();

            var api = new TrackApiUnderTest();

            // Act
            var response = api.GetNowPlayingResponseFromNavigatorUnderTest(mockedNavigator);

            // Assert
            Assert.AreEqual("Massive Attack (Album Artist)", response.Track.AlbumArtist);
        }
Ejemplo n.º 4
0
        public void GetNowPlayingResponseFromNavigator_MockResponse_TrackNameSet()
        {
            // Arrange
            var document = new XmlDocument();

            document.LoadXml(NowPlayingXml);
            var mockedNavigator = document.CreateNavigator();

            var api = new TrackApiUnderTest();

            // Act
            var response = api.GetNowPlayingResponseFromNavigatorUnderTest(mockedNavigator);

            // Assert
            Assert.AreEqual("Spying Glass", response.Track.TrackName);
        }
Ejemplo n.º 5
0
        public void GetNowPlayingResponseFromNavigator_CorrectedTrackName_TrackNameCorrectedIsTrue()
        {
            // Arrange
            const string xml      = "<?xml version=\"1.0\" encoding=\"utf-8\"?><lfm status=\"ok\"><nowplaying><track corrected=\"1\">Spying Glass</track><artist corrected=\"0\">Massive Attack</artist><album corrected=\"0\">Protection</album><albumArtist corrected=\"0\">Massive Attack</albumArtist><ignoredMessage code=\"0\"></ignoredMessage></nowplaying></lfm>";
            var          document = new XmlDocument();

            document.LoadXml(xml);
            var mockedNavigator = document.CreateNavigator();

            var api = new TrackApiUnderTest();

            // Act
            var response = api.GetNowPlayingResponseFromNavigatorUnderTest(mockedNavigator);

            // Assert
            Assert.IsTrue(((CorrectedTrack)response.Track).TrackNameCorrected);
        }
        public void GetNowPlayingResponseFromNavigator_CorrectedTrackName_TrackNameCorrectedIsTrue()
        {
            // Arrange
            const string xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?><lfm status=\"ok\"><nowplaying><track corrected=\"1\">Spying Glass</track><artist corrected=\"0\">Massive Attack</artist><album corrected=\"0\">Protection</album><albumArtist corrected=\"0\">Massive Attack</albumArtist><ignoredMessage code=\"0\"></ignoredMessage></nowplaying></lfm>";
            var document = new XmlDocument();
            document.LoadXml(xml);
            var mockedNavigator = document.CreateNavigator();

            var api = new TrackApiUnderTest();

            // Act
            var response = api.GetNowPlayingResponseFromNavigatorUnderTest(mockedNavigator);

            // Assert
            Assert.IsTrue(((CorrectedTrack) response.Track).TrackNameCorrected);
        }