コード例 #1
0
    static Tests()
    {
        BuildServerDetector.Detected = false;
        DiffTools.AddTool(
            name: "MyTools",
            autoRefresh: true,
            isMdi: false,
            supportsText: true,
            requiresTarget: true,
            arguments: (path1, path2) => $"\"{path1}\" \"{path2}\"",
            exePath: diffToolPath,
            binaryExtensions: new[] { "knownBin" });
        var binPath = AllFiles.Files["jpg"];
        var newPath = Path.ChangeExtension(binPath.Path, "knownBin");

        File.Copy(binPath.Path, newPath, true);
        AllFiles.UseFile(Category.Image, newPath);

        SharedVerifySettings.RegisterFileConverter <TypeToSplit>(
            "txt",
            (split, settings) => new ConversionResult(
                split.Info,
                new List <Stream>
        {
            new MemoryStream(FileHelpers.Utf8NoBOM.GetBytes(split.Property1)),
            new MemoryStream(FileHelpers.Utf8NoBOM.GetBytes(split.Property2))
        }));
        DiffRunner.MaxInstancesToLaunch(int.MaxValue);
    }
コード例 #2
0
    static Tests()
    {
        BuildServerDetector.Detected = false;
        DiffRunner.Disabled          = false;
        DiffTools.AddTool(
            name: "MyTools",
            autoRefresh: true,
            isMdi: false,
            supportsText: true,
            requiresTarget: true,
            arguments: (path1, path2) => $"\"{path1}\" \"{path2}\"",
            exePath: diffToolPath,
            binaryExtensions: new[] { "knownBin" });
        var binPath = AllFiles.Files["jpg"];
        var newPath = Path.ChangeExtension(binPath.Path, "knownBin");

        File.Copy(binPath.Path, newPath, true);
        AllFiles.UseFile(Category.Image, newPath);

        VerifierSettings.RegisterFileConverter <TypeToSplit>(
            (split, _) => new ConversionResult(
                split.Info,
                new List <Target>
        {
            new("txt", split.Property1),
            new("txt", split.Property2)
        }));
コード例 #3
0
ファイル: Tests.cs プロジェクト: slang25/EmptyFiles
    public void UseFile()
    {
        var pathToFile = SourceFile;

        #region UseFile
        AllFiles.UseFile(Category.Document, pathToFile);
        Assert.Contains(pathToFile, AllFiles.DocumentPaths);
        #endregion
    }