Beispiel #1
0
        public void ProcessTrackInfoTest()
        {
            bool trackChanged    = false;
            bool trackTimerFiler = false;

            _spotifyController.TrackStatusChanged += (sender, args) =>
            {
                trackTimerFiler = true;
            };
            _spotifyController.TrackChanged += (sender, args) =>
            {
                trackChanged = true;
            };
            var status = new Status();

            status.track = new Track
            {
                track_resource = new Resource
                {
                    uri = "Awesome Track"
                }
            };
            _spotifyController.ProcessTrackInfo(status);
            Assert.True(trackChanged);

            _spotifyController.ProcessTrackInfo(status);
            Assert.True(trackTimerFiler);
        }