Esempio n. 1
0
        public void Resolve_ValidFileName_Success(AudioBookFileInfo expectedResult)
        {
            var result = new AudioBookResolver(_namingOptions).Resolve(expectedResult.Path);

            Assert.NotNull(result);
            Assert.Equal(result !.Path, expectedResult.Path);
            Assert.Equal(result !.Container, expectedResult.Container);
            Assert.Equal(result !.ChapterNumber, expectedResult.ChapterNumber);
            Assert.Equal(result !.PartNumber, expectedResult.PartNumber);
        }
Esempio n. 2
0
        public void Resolve_EmptyFileName()
        {
            var result = new AudioBookResolver(_namingOptions).Resolve(string.Empty);

            Assert.Null(result);
        }
Esempio n. 3
0
        public void Resolve_InvalidExtension()
        {
            var result = new AudioBookResolver(_namingOptions).Resolve(@"/server/AudioBooks/Larry Potter/Larry Potter.mp9");

            Assert.Null(result);
        }