Ejemplo n.º 1
0
            public void ShouldThrow()
            {
                // Given
                FileSystem fileSystem = new FileSystem();
                VirtualInputDirectory directory = new VirtualInputDirectory(fileSystem, ".");

                // When, Then
                Assert.Throws<NotSupportedException>(() => directory.Delete(false));
            }
Ejemplo n.º 2
0
            public void GetsInputFileAboveInputDirectory()
            {
                // Given
                FileSystem fileSystem = new FileSystem();
                fileSystem.RootPath = "/a";
                fileSystem.InputPaths.Add("b/d");
                fileSystem.InputPaths.Add("alt:///foo");
                fileSystem.FileProviders.Add(NormalizedPath.DefaultFileProvider.Scheme, GetFileProviderA());
                fileSystem.FileProviders.Add("alt", GetFileProviderB());
                VirtualInputDirectory directory = new VirtualInputDirectory(fileSystem, ".");

                // When
                IFile file = directory.GetFile("../c/foo.txt");

                // Then
                Assert.AreEqual("/a/b/c/foo.txt", file.Path.FullPath);
            }