Created
March 27, 2012 16:25
-
-
Save jamesrcounts/2217679 to your computer and use it in GitHub Desktop.
A DevArt CodeCompare DiffReporter for ApprovalTests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: ApprovalTests.sln | |
=================================================================== | |
--- ApprovalTests.sln (revision 392) | |
+++ ApprovalTests.sln (working copy) | |
@@ -4,7 +4,7 @@ | |
ProjectSection(SolutionItems) = preProject | |
ApprovalTests.build = ApprovalTests.build | |
ApprovalTests.vsmdi = ApprovalTests.vsmdi | |
- ApprovalTests3.vsmdi = ApprovalTests3.vsmdi | |
+ ApprovalTests1.vsmdi = ApprovalTests1.vsmdi | |
LocalTestRun.testrunconfig = LocalTestRun.testrunconfig | |
EndProjectSection | |
EndProject | |
@@ -41,7 +41,7 @@ | |
EndProject | |
Global | |
GlobalSection(TestCaseManagementSettings) = postSolution | |
- CategoryFile = ApprovalTests3.vsmdi | |
+ CategoryFile = ApprovalTests1.vsmdi | |
EndGlobalSection | |
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |
Debug|Any CPU = Debug|Any CPU | |
Index: ApprovalTests.Tests/Reporters/GenericDiffReporterTest.cs | |
=================================================================== | |
--- ApprovalTests.Tests/Reporters/GenericDiffReporterTest.cs (revision 392) | |
+++ ApprovalTests.Tests/Reporters/GenericDiffReporterTest.cs (working copy) | |
@@ -42,6 +42,11 @@ | |
{ | |
AssertLauncher("../../a.txt", "../../b.txt", KDiffReporter.INSTANCE); | |
} | |
+ [Test] | |
+ public void TestLaunchesCodeCompare() | |
+ { | |
+ AssertLauncher("../../a.txt", "../../b.txt", CodeCompareReporter.INSTANCE); | |
+ } | |
private static void AssertLauncher(string approved, string received, GenericDiffReporter reporter) | |
{ | |
Index: ApprovalTests/ApprovalTests.csproj | |
=================================================================== | |
--- ApprovalTests/ApprovalTests.csproj (revision 392) | |
+++ ApprovalTests/ApprovalTests.csproj (working copy) | |
@@ -111,6 +111,7 @@ | |
<Compile Include="Reporters\AssertReporter.cs" /> | |
<Compile Include="Reporters\BeyondCompareReporter.cs" /> | |
<Compile Include="Reporters\ClipboardReporter.cs" /> | |
+ <Compile Include="Reporters\CodeCompareReporter.cs" /> | |
<Compile Include="Reporters\DotNet4Utilities.cs" /> | |
<Compile Include="Reporters\KDiffReporter.cs" /> | |
<Compile Include="Reporters\VisualStudioReporter.cs" /> | |
Index: ApprovalTests/Reporters/CodeCompareReporter.cs | |
=================================================================== | |
--- ApprovalTests/Reporters/CodeCompareReporter.cs (revision 0) | |
+++ ApprovalTests/Reporters/CodeCompareReporter.cs (working copy) | |
@@ -0,0 +1,17 @@ | |
+using ApprovalUtilities.Utilities; | |
+namespace ApprovalTests.Reporters | |
+{ | |
+ public class CodeCompareReporter : GenericDiffReporter | |
+ { | |
+ private readonly static string PATH = DotNet4Utilities.GetPathInProgramFilesX86(@"Devart\Code Compare\CodeCompare.exe"); | |
+ public readonly static CodeCompareReporter INSTANCE = new CodeCompareReporter(); | |
+ | |
+ public CodeCompareReporter() | |
+ : base( | |
+ PATH, | |
+ "/ENVIRONMENT=visualstudio \"{0}\" \"{1}\"", | |
+ "Could not find DevArt Code Compare at {0}.".FormatWith(PATH)) | |
+ { | |
+ } | |
+ } | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DevArt CodeCompare is a diff utility that integrates with Visual Studio 2010.
Available at: http://www.devart.com/codecompare/