예제 #1
0
        public void Map_MapsAllProperties()
        {
            // Arrange
            var currentSong       = new CurrentSong();
            var songWithVoteCount = new SongWithVoteCount
            {
                Song = new Song {
                    DurationInSeconds = 120
                },
                VoteCount = 22
            };

            // Act
            currentSong.Map(songWithVoteCount, _clock);

            // Assert
            Assert.That(currentSong.SongId, Is.EqualTo(songWithVoteCount.Song.Id));
            Assert.That(currentSong.Song, Is.EqualTo(songWithVoteCount.Song));
            Assert.That(currentSong.VoteCount, Is.EqualTo(songWithVoteCount.VoteCount));
            Assert.That(currentSong.EndsAtTime.UtcDateTime, Is.EqualTo(_clock.UtcNow.AddSeconds(115)));
        }