public void SetCurrentDirectoryThrowsOnRelative() { IExtendedFileService extendedFileService = Substitute.For<IExtendedFileService>(); IFileService fileService = Substitute.For<IFileService>(); fileService.GetFullPath("").ReturnsForAnyArgs(x => x[0]); fileService.GetAttributes("").ReturnsForAnyArgs(System.IO.FileAttributes.Directory); extendedFileService.GetVolumeName("").ReturnsForAnyArgs("TestRoot"); CurrentDirectory cd = new CurrentDirectory(fileService, extendedFileService); Action action = () => cd.SetCurrentDirectory("a"); action.ShouldThrow<ArgumentException>(); }
public FileService(IExtendedFileService extendedFileService) { this.directory = new Flex.CurrentDirectory(this, extendedFileService); }
public FileService(IExtendedFileService extendedFileService) { this.directory = new Flex.CurrentDirectory(this, extendedFileService); }
public FileService(IExtendedFileService extendedFileService, string initialCurrentDirectory = null) { _directory = new CurrentDirectory(this, extendedFileService, initialCurrentDirectory); }
public FileService(IExtendedFileService extendedFileService) { _directory = new CurrentDirectory(this, extendedFileService); }
public FileService(IExtendedFileService extendedFileService, string initialCurrentDirectory = null) { _directory = new CurrentDirectory(this, extendedFileService, initialCurrentDirectory); }