public void To_ShouldPerformCopy() { var fs = MockRepository.GenerateStub<IFileSystemWrapper>(); var fileSet = new Core.FileSet(); fileSet.Include(new File(@"c:\temp\test1.txt")); fileSet.Include(new File(@"c:\temp\test2.txt")); var subject = new CopyFileset(fileSet, fs); string destination = @"c:\destination"; var dest = new Core.Directory(destination); subject.To(dest); fs.AssertWasCalled(x=>x.Copy(fileSet.Files[0], destination + "\\test1.txt")); fs.AssertWasCalled(x => x.Copy(fileSet.Files[1], destination + "\\test2.txt")); }
public void To_ShouldPerformCopy() { var fs = MockRepository.GenerateStub <IFileSystemWrapper>(); var fileSet = new Core.FileSet(); fileSet.Include(new File(@"c:\temp\test1.txt")); fileSet.Include(new File(@"c:\temp\test2.txt")); var subject = new CopyFileset(fileSet, fs); string destination = @"c:\destination"; var dest = new Core.Directory(destination); subject.To(dest); fs.AssertWasCalled(x => x.Copy(fileSet.Files[0], destination + "\\test1.txt")); fs.AssertWasCalled(x => x.Copy(fileSet.Files[1], destination + "\\test2.txt")); }
internal DirectoryChoices(Core.FileSet fileset, IFileSystemUtility utility, bool isInclusion) : base(utility) { _fileset = fileset; _isInclusion = isInclusion; }
internal CopyFileset(Core.FileSet fileSet) : this(fileSet, new FileSystemWrapper()) { }
internal CopyFileset(Core.FileSet fileSet, IFileSystemWrapper fileSystemWrapper) { _fileSet = fileSet; _fileSystemWrapper = fileSystemWrapper; }