private void BackupTundraFile(NPath file, int incrementalPassNumber)
 {
     if (!file.FileExists())
     {
         return;
     }
     file.Copy(file.Parent.Combine($"{file.FileNameWithoutExtension}{incrementalPassNumber}.{file.Extension}"));
 }
        static void EnsureMockTypesAssemblyInFolder(NPath targetFolder)
        {
            // ensure that our assembly with the mock types is discoverable by putting in the same folder as the dll that is having its types
            // injected into it. we could mess with the assembly resolver to avoid this, but that won't solve the issue for appdomains and
            // other environments that we don't control, like peverify.

            var mockTypesSrcPath = new NPath(MockInjector.MockTypesAssembly.Location);
            var mockTypesDstPath = targetFolder.Combine(mockTypesSrcPath.FileName);

            if (mockTypesSrcPath != mockTypesDstPath)
            {
                mockTypesSrcPath.Copy(mockTypesDstPath);
            }
        }
예제 #3
0
 protected void CopyToInputAndExpectations(NPath source)
 {
     source.Copy(InputDirectory);
     source.Copy(ExpectationsDirectory);
 }