Skip to content

Commit 7dca6e8

Browse files
author
Jake Ginnivan
committed
Added another convention test which requires items to be filtered
1 parent 4b6227d commit 7dca6e8

30 files changed

+290
-43
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ _ReSharper.*
1111
*.suo
1212
*.crunchproject.local.xml
1313
*.crunchsolution.local.xml
14-
ConventionTests*.nupkg
14+
ConventionTests*.nupkg
15+
_NCrunch*
16+
*.received.txt
17+
*.orig
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace TestAssembly
2+
{
3+
public class ClassWithNoDefaultCtor
4+
{
5+
// ReSharper disable once UnusedParameter.Local
6+
public ClassWithNoDefaultCtor(string foo) { }
7+
}
8+
}
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
namespace TestAssembly
2-
{
3-
public class ClassWithNonVirtualMethod
4-
{
5-
public string NonVirtual()
6-
{
7-
return null;
8-
}
9-
}
10-
}
1+
namespace TestAssembly
2+
{
3+
public class SampleDomainClass
4+
{
5+
public void TestNonVirtual() { }
6+
public virtual void Virtual() { }
7+
}
8+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace TestAssembly
2+
{
3+
public class ClassWithPrivateDefaultCtor
4+
{
5+
private ClassWithPrivateDefaultCtor() { }
6+
}
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace TestAssembly
2+
{
3+
public class ClassWithProtectedDefaultCtor
4+
{
5+
protected ClassWithProtectedDefaultCtor(){}
6+
}
7+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace TestAssembly
2+
{
3+
public class ClassWithPublicDefaultCtor
4+
{
5+
}
6+
}

TestAssembly/TestAssembly.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@
3939
<Reference Include="System.Xml" />
4040
</ItemGroup>
4141
<ItemGroup>
42+
<Compile Include="ClassWithNoDefaultCtor.cs" />
4243
<Compile Include="ClassWithNonVirtualMethod.cs" />
44+
<Compile Include="ClassWithPrivateDefaultCtor.cs" />
45+
<Compile Include="ClassWithProtectedDefaultCtor.cs" />
46+
<Compile Include="ClassWithPublicDefaultCtor.cs" />
4347
<Compile Include="Properties\AssemblyInfo.cs" />
4448
</ItemGroup>
4549
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Convention has failing items
2-
TestStack.ConventionTests.Tests is referencing assemblies in the bin or obj folders, bin\Debug\ApprovalTests.dll
2+
TestStack.ConventionTests.Tests is referencing assemblies in the bin or obj folders:
3+
bin\Debug\ApprovalTests.dll
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Convention has failing items
2+
TestStack.ConventionTests.Tests has the following files which should be embedded resources:
3+
Scripts\Script2.sql which currently has a build action of 'None'
File renamed without changes.

0 commit comments

Comments
 (0)