Beispiel #1
0
        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>();
        }
Beispiel #2
0
 public FileService(IExtendedFileService extendedFileService)
 {
     this.directory = new Flex.CurrentDirectory(this, extendedFileService);
 }
Beispiel #3
0
 public FileService(IExtendedFileService extendedFileService)
 {
     this.directory = new Flex.CurrentDirectory(this, extendedFileService);
 }
Beispiel #4
0
 public FileService(IExtendedFileService extendedFileService, string initialCurrentDirectory = null)
 {
     _directory = new CurrentDirectory(this, extendedFileService, initialCurrentDirectory);
 }
Beispiel #5
0
 public FileService(IExtendedFileService extendedFileService)
 {
     _directory = new CurrentDirectory(this, extendedFileService);
 }
Beispiel #6
0
 public FileService(IExtendedFileService extendedFileService, string initialCurrentDirectory = null)
 {
     _directory = new CurrentDirectory(this, extendedFileService, initialCurrentDirectory);
 }