-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breaking change - Mono.Cecil dependency removed
- Removed IProjectLocator, you cannot find the project without reading PDB's - Users can either pass a path in, or give a project provider which can return the xml directly This results in simpler and easier to understand usage. Less magic and we don't have the mono.cecil dependency :)
- Loading branch information
1 parent
611d124
commit 3b2ef28
Showing
21 changed files
with
123 additions
and
154 deletions.
There are no files selected for viewing
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
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
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
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
4 changes: 2 additions & 2 deletions
4
...tions.all_configuration_groups_should_have_optimize_true_if_property_defined.approved.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
'Optimize property in Release|AnyCPU must have a value of true' for 'Project property groups in TestStack.ConventionTests.Tests' | ||
-------------------------------------------------------------------------------------------------------------------------------- | ||
'Optimize property in Release|AnyCPU must have a value of true' for 'Project property groups in ProjectName' | ||
------------------------------------------------------------------------------------------------------------ | ||
|
||
Optimize:false |
12 changes: 10 additions & 2 deletions
12
...ProjectBasedConventions.all_configuration_groups_should_have_platform_AnyCPU.approved.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
'Platform property in Release|x86 must have a value of AnyCPU' for 'Project property groups in TestStack.ConventionTests.Tests' | ||
------------------------------------------------------------------------------------------------------------------------------- | ||
'Platform property in Global must have a value of AnyCPU' for 'Project property groups in ProjectName' | ||
------------------------------------------------------------------------------------------------------ | ||
|
||
|
||
'Platform property in Release|AnyCPU must have a value of AnyCPU' for 'Project property groups in ProjectName' | ||
-------------------------------------------------------------------------------------------------------------- | ||
|
||
|
||
'Platform property in Release|x86 must have a value of AnyCPU' for 'Project property groups in ProjectName' | ||
----------------------------------------------------------------------------------------------------------- | ||
|
||
Platform:x86 |
4 changes: 2 additions & 2 deletions
4
...ConventionTests.Tests/ProjectBasedConventions.assemblies_referencing_bin_obj.approved.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
'Project must not reference dlls from bin or obj directories' for 'Project references in TestStack.ConventionTests.Tests' | ||
------------------------------------------------------------------------------------------------------------------------- | ||
'Project must not reference dlls from bin or obj directories' for 'Project references in ProjectName' | ||
----------------------------------------------------------------------------------------------------- | ||
|
||
bin\Debug\ApprovalTests.dll |
4 changes: 2 additions & 2 deletions
4
...jectBasedConventions.assemblies_referencing_bin_obj_with_approved_exceptions.approved.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
'Project must not reference dlls from bin or obj directories' for 'Project references in TestStack.ConventionTests.Tests' | ||
------------------------------------------------------------------------------------------------------------------------- | ||
'Project must not reference dlls from bin or obj directories' for 'Project references in ProjectName' | ||
----------------------------------------------------------------------------------------------------- | ||
|
||
bin\Debug\ApprovalTests.dll |
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
8 changes: 4 additions & 4 deletions
8
...ionTests.Tests/ProjectBasedConventions.release_debug_type_should_be_pdb_only.approved.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
'DebugType property in Release|AnyCPU must have a value of pdbonly' for 'Project property groups in TestStack.ConventionTests.Tests' | ||
------------------------------------------------------------------------------------------------------------------------------------ | ||
'DebugType property in Release|AnyCPU must have a value of pdbonly' for 'Project property groups in ProjectName' | ||
---------------------------------------------------------------------------------------------------------------- | ||
|
||
DebugType:full | ||
|
||
'DebugType property in Release|x86 must have a value of pdbonly' for 'Project property groups in TestStack.ConventionTests.Tests' | ||
--------------------------------------------------------------------------------------------------------------------------------- | ||
'DebugType property in Release|x86 must have a value of pdbonly' for 'Project property groups in ProjectName' | ||
------------------------------------------------------------------------------------------------------------- | ||
|
||
DebugType:full |
4 changes: 2 additions & 2 deletions
4
...ConventionTests.Tests/ProjectBasedConventions.scripts_not_embedded_resources.approved.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
'.sql Files must be embedded resources' for 'Project file items in TestStack.ConventionTests.Tests' | ||
--------------------------------------------------------------------------------------------------- | ||
'.sql Files must be embedded resources' for 'Project file items in ProjectName' | ||
------------------------------------------------------------------------------- | ||
|
||
Scripts\Script2.sql |
24 changes: 10 additions & 14 deletions
24
TestStack.ConventionTests/ConventionData/AbstractProjectData.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,29 @@ | ||
namespace TestStack.ConventionTests.ConventionData | ||
{ | ||
using System.Reflection; | ||
using System.IO; | ||
using System.Xml.Linq; | ||
using TestStack.ConventionTests.Internal; | ||
|
||
public abstract class AbstractProjectData : IConventionData | ||
{ | ||
protected AbstractProjectData(Assembly assembly, IProjectProvider projectProvider = null, IProjectLocator projectLocator = null) | ||
protected AbstractProjectData(IProjectProvider projectProvider) | ||
{ | ||
Assembly = assembly; | ||
ProjectProvider = projectProvider ?? new ProjectProvider(); | ||
ProjectLocator = projectLocator ?? new AssemblyProjectLocator(); | ||
ProjectProvider = projectProvider; | ||
} | ||
protected AbstractProjectData(string projectFilePath) | ||
{ | ||
ProjectProvider = new ProjectFileFromDiskProvider(projectFilePath); | ||
} | ||
|
||
public Assembly Assembly { get; private set; } | ||
|
||
public IProjectLocator ProjectLocator { get; private set; } | ||
|
||
public IProjectProvider ProjectProvider { get; private set; } | ||
|
||
public string Description { get { return Assembly.GetName().Name; } } | ||
public string Description { get { return ProjectProvider.GetName(); } } | ||
|
||
public bool HasData { get { return ProjectLocator.ResolveProjectFilePath(Assembly) != null; } } | ||
public bool HasData { get { return true; } } | ||
|
||
protected XDocument GetProject() | ||
{ | ||
var location = ProjectLocator.ResolveProjectFilePath(Assembly); | ||
var project = ProjectProvider.LoadProjectDocument(location); | ||
return project; | ||
return ProjectProvider.LoadProjectDocument(); | ||
} | ||
} | ||
} |
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
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
10 changes: 6 additions & 4 deletions
10
TestStack.ConventionTests/ConventionData/ProjectReferences.cs
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
Oops, something went wrong.