public void GivenThatTheDisableDiffAssertionsEnvronmentVariableExist_ThenItReturnsTrue()
 {
     try
     {
         Environment.SetEnvironmentVariable("DISABLE_DIFF_ASSERTIONS", "0");
         Assert.True(DiffToolInvoker.IsOnBuildServer());
     }
     finally
     {
         Environment.SetEnvironmentVariable("DISABLE_DIFF_ASSERTIONS", null);
     }
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="testFrameworkAsserter"></param>
        /// <param name="diffTool"></param>
        /// <param name="fileManager"></param>
        /// <returns></returns>
        public static IDiffAsserter CreateInstance(
            ITestFrameworkAsserter testFrameworkAsserter = null,
            IDiffTool diffTool           = null,
            ITestFileManager fileManager = null)
        {
            if (testFrameworkAsserter != null && diffTool != null && fileManager != null)
            {
                return(new DiffAsserter(testFrameworkAsserter, diffTool, fileManager));
            }

            var settings   = new ConfigurationBuilderBasedSettings();
            var rootFolder = DiffToolInvoker.IsOnBuildServer() ? "" : settings.RootFolder;

            return(new DiffAsserter(
                       testFrameworkAsserter ?? new MultiTestFrameworkAsserter(settings.TestFramework),
                       diffTool ?? new DiffToolInvoker(settings.DiffTool, settings.DiffToolArgsFormat),
                       fileManager ?? new TestFileManager(rootFolder)));
        }
 public void GivenThatNoneOfTheBuildServerIndicatorsAreThere_ThenItReturnsFalse()
 {
     Assert.False(DiffToolInvoker.IsOnBuildServer());
 }