public void RunsWithDefaultParametersForSilverlightProfile()
        {
            var appName        = "http://somewhere/silverlight.html";
            var result         = GenerateResultMock();
            var executablePath = Path.Combine(defaultWorkingDir, "Profile");
            var executor       = GenerateExecutorMock(
                executablePath,
                this.defaultExecutableArgs + " /silverlight:" + appName,
                defaultWorkingDir,
                600000);
            var fileSystemMock = this.InitialiseFileSystemMock(executablePath);
            var logger         = mocks.Create <ILogger>().Object;
            var task           = new AntsPerformanceProfilerTask(executor, fileSystemMock, logger)
            {
                PublishFiles = false
            };

            task.Silverlight = appName;

            Mock.Get(result).SetupProperty(_result => _result.Status);
            result.Status = IntegrationStatus.Unknown;
            task.Run(result);
            mocks.Verify();
        }
Example #2
0
        public void RunsWithDefaultParametersForAppProfileAndAllFiles()
        {
            var appName        = "testApp.exe";
            var result         = GenerateResultMock();
            var executablePath = Path.Combine(defaultWorkingDir, "Profile");
            var executor       = GenerateExecutorMock(
                executablePath,
                this.defaultExecutableArgs + " /e:" + Path.Combine(defaultWorkingDir, appName) +
                " /csv:" + Path.Combine(defaultWorkingDir, "summary.csv") +
                " /xml:" + Path.Combine(defaultWorkingDir, "summary.xml") +
                " /h:" + Path.Combine(defaultWorkingDir, "summary.html") +
                " /calltree:" + Path.Combine(defaultWorkingDir, "calltree.xml") +
                " /cth:" + Path.Combine(defaultWorkingDir, "calltree.html") +
                " /data:" + Path.Combine(defaultWorkingDir, "data.out"),
                defaultWorkingDir,
                600000);
            var fileSystemMock = this.InitialiseFileSystemMock(executablePath);
            var logger         = mocks.Create <ILogger>().Object;
            var task           = new AntsPerformanceProfilerTask(executor, fileSystemMock, logger)
            {
                PublishFiles = false
            };

            task.Application      = appName;
            task.SummaryCsvFile   = "summary.csv";
            task.SummaryXmlFile   = "summary.xml";
            task.SummaryHtmlFile  = "summary.html";
            task.CallTreeXmlFile  = "calltree.xml";
            task.CallTreeHtmlFile = "calltree.html";
            task.DataFile         = "data.out";

            Mock.Get(result).SetupProperty(_result => _result.Status);
            result.Status = IntegrationStatus.Unknown;
            task.Run(result);
            mocks.Verify();
        }