Esempio n. 1
0
        public void ApplicationFolderIsNotNestedAsExpected_ShouldThrow()
        {
            var    applicationFolder = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory)?.Parent;
            var    fileFinder        = new SampleFileFinder(applicationFolder.FullName);
            Action action            = () => fileFinder.GetPath();

            var exception = Assert.Throws <ArgumentException>(action);

            Assert.Equal("Unexpected folder structure.", exception.Message);
        }
Esempio n. 2
0
        public void CanReachSampleFile()
        {
            var applicationFolder = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory);
            var fileFinder        = new SampleFileFinder(applicationFolder.FullName);

            var result = fileFinder.GetPath();
            var file   = new FileInfo(result);

            Assert.True(file.Exists);
            Assert.Equal(@"PDFiller.WebsiteGenerator.sln", file.Name);
        }