Пример #1
0
        private void InitMp3SongViewModel(bool paramFileExists, IDialogService paramDialogService)
        {
            MockMp3File      mp3File      = new MockMp3File(InitTitle, InitArtist, InitAlbum);
            MockFileModifier fileModifier = new MockFileModifier(paramFileExists);

            Mp3Song tempMp3Song = new Mp3Song(mp3File, fileModifier);

            this.mp3SongViewModel = new Mp3SongViewModel(tempMp3Song, paramDialogService);
        }
Пример #2
0
        public void IsWishedFilePathCorrect()
        {
            // Arrange
            this.mp3Song.Title = "Andre";
            MockMp3File mockMp3File   = (MockMp3File)this.mp3File;
            string      expectedValue = mockMp3File.WishedFilePath;

            // Act
            string actualValue = this.mp3Song.WishedFilePath;

            // Assert
            Assert.AreEqual(expectedValue, actualValue);
        }
Пример #3
0
        public void ChangeFilePathWhenSaved()
        {
            // Arrange
            const string ExpectedTitle = "Test Titleäü";

            this.mp3Song.Title = ExpectedTitle;

            MockMp3File mockMp3File   = (MockMp3File)this.mp3File;
            string      expectedValue = mockMp3File.WishedFilePath;

            // Act
            this.mp3Song.SaveAndRename();

            // Assert
            Assert.AreEqual(expectedValue, this.mp3Song.FilePath);
        }