Skip to content

Commit 45917c2

Browse files
committed
Merge pull request #32 from JakeGinnivan/MoreReportingChanges
More reporting changes
2 parents 9e739c8 + 54b98ef commit 45917c2

File tree

48 files changed

+633
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+633
-295
lines changed

TestStack.ConventionTests.Tests/ConventionAssertionClassTests.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
{
33
using ApprovalTests.Reporters;
44
using NUnit.Framework;
5-
using TestStack.ConventionTests.Internal;
65

76
[TestFixture]
8-
[UseReporter(typeof(DiffReporter))] //NOTE: Can we take care of this in IsWithApprovedExceptions?
7+
[UseReporter(typeof(QuietReporter))] //NOTE: Can we take care of this in IsWithApprovedExceptions?
98
public class ConventionAssertionClassTests
109
{
1110
[Test]
@@ -19,19 +18,14 @@ public void approval_mismatch()
1918
StringAssert.Contains("does not match approved file", ex.Message);
2019
}
2120

22-
public class FakeData : IConventionData
21+
class FakeData : IConventionData
2322
{
2423
public string Description { get { return "Fake data"; } }
2524

2625
public bool HasData { get { return true; } }
27-
28-
public ConventionReportFailure Format(string failingData)
29-
{
30-
return new ConventionReportFailure(failingData);
31-
}
3226
}
3327

34-
public class FailingConvention : IConvention<FakeData>
28+
class FailingConvention : IConvention<FakeData>
3529
{
3630
public void Execute(FakeData data, IConventionResultContext result)
3731
{
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'Api Controllers must be suffixed with Controller' for 'TestAssembly'
2-
---------------------------------------------------------------------
1+
'Api Controllers must be suffixed with Controller' for 'Types in TestAssembly'
2+
------------------------------------------------------------------------------
33

44
TestAssembly.Controllers.BarApiControler
55

6-
'Types named *Controller must inherit from ApiController or Controller' for 'TestAssembly'
7-
------------------------------------------------------------------------------------------
6+
'Types named *Controller must inherit from ApiController or Controller' for 'Types in TestAssembly'
7+
---------------------------------------------------------------------------------------------------
88

99
TestAssembly.Controllers.TestApiController
1010
TestAssembly.Controllers.TestController
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'Mvc Controllers must be suffixed with Controller' for 'TestAssembly'
2-
---------------------------------------------------------------------
1+
'Mvc Controllers must be suffixed with Controller' for 'Types in TestAssembly'
2+
------------------------------------------------------------------------------
33

44
TestAssembly.Controllers.FooControler
55

6-
'Types named *Controller must inherit from ApiController or Controller' for 'TestAssembly'
7-
------------------------------------------------------------------------------------------
6+
'Types named *Controller must inherit from ApiController or Controller' for 'Types in TestAssembly'
7+
---------------------------------------------------------------------------------------------------
88

99
TestAssembly.Controllers.TestApiController
1010
TestAssembly.Controllers.TestController
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'Project must not reference dlls from bin or obj directories' for 'TestStack.ConventionTests.Tests'
2-
---------------------------------------------------------------------------------------------------
1+
'Project must not reference dlls from bin or obj directories' for 'Project references in TestStack.ConventionTests.Tests'
2+
-------------------------------------------------------------------------------------------------------------------------
33

44
bin\Debug\ApprovalTests.dll
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'Project must not reference dlls from bin or obj directories' for 'TestStack.ConventionTests.Tests'
2-
---------------------------------------------------------------------------------------------------
1+
'Project must not reference dlls from bin or obj directories' for 'Project references in TestStack.ConventionTests.Tests'
2+
-------------------------------------------------------------------------------------------------------------------------
33

44
bin\Debug\ApprovalTests.dll

TestStack.ConventionTests.Tests/ProjectBasedConventions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void scripts_not_embedded_resources()
5757
.Returns(XDocument.Parse(Resources.ProjectFileWithInvalidSqlScriptFile));
5858

5959
var projectLocator = Substitute.For<IProjectLocator>();
60-
var project = new ProjectFiles(typeof (ProjectBasedConventions).Assembly, projectProvider, projectLocator);
60+
var project = new ProjectFileItems(typeof (ProjectBasedConventions).Assembly, projectProvider, projectLocator);
6161
var ex = Assert.Throws<ConventionFailedException>(() => Convention.Is(new FilesAreEmbeddedResources(".sql"), project));
6262

6363
Approvals.Verify(ex.Message);
@@ -67,7 +67,7 @@ public void scripts_not_embedded_resources()
6767
public void scripts_not_embedded_resources_with_approved_exceptions()
6868
{
6969
var projectLocator = Substitute.For<IProjectLocator>();
70-
var project = new ProjectFiles(typeof (ProjectBasedConventions).Assembly, projectProvider, projectLocator);
70+
var project = new ProjectFileItems(typeof (ProjectBasedConventions).Assembly, projectProvider, projectLocator);
7171
projectProvider
7272
.LoadProjectDocument(Arg.Any<string>())
7373
.Returns(XDocument.Parse(Resources.ProjectFileWithInvalidSqlScriptFile));
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'.sql Files must be embedded resources' for 'TestStack.ConventionTests.Tests'
2-
-----------------------------------------------------------------------------
1+
'.sql Files must be embedded resources' for 'Project file items in TestStack.ConventionTests.Tests'
2+
---------------------------------------------------------------------------------------------------
33

44
Scripts\Script2.sql
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'.sql Files must be embedded resources' for 'TestStack.ConventionTests.Tests'
2-
-----------------------------------------------------------------------------
1+
'.sql Files must be embedded resources' for 'Project file items in TestStack.ConventionTests.Tests'
2+
---------------------------------------------------------------------------------------------------
33

44
Scripts\Script2.sql

TestStack.ConventionTests.Tests/Properties/AssemblyInfo.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
using System.Reflection;
22
using System.Runtime.InteropServices;
3-
43
// General Information about an assembly is controlled through the following
54
// set of attributes. Change these attribute values to modify the information
65
// associated with an assembly.
6+
using TestStack.ConventionTests;
7+
using TestStack.ConventionTests.Reporting;
8+
79
[assembly: AssemblyTitle("TestStack.ConventionTests.Tests")]
810
[assembly: AssemblyDescription("")]
911
[assembly: AssemblyConfiguration("")]
@@ -33,3 +35,6 @@
3335
// [assembly: AssemblyVersion("1.0.*")]
3436
[assembly: AssemblyVersion("1.0.0.0")]
3537
[assembly: AssemblyFileVersion("1.0.0.0")]
38+
39+
[assembly: ConventionReporter(typeof(HtmlConventionResultsReporter))]
40+
[assembly: ConventionReporter(typeof(MarkdownConventionResultsReporter))]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
'Types must have a default constructor' for 'nHibernate Entitites'
2-
------------------------------------------------------------------
1+
'Types must have a default constructor' for 'Types in nHibernate Entitites'
2+
---------------------------------------------------------------------------
33

44
TestAssembly.ClassWithNoDefaultCtor
55
TestAssembly.ClassWithPrivateDefaultCtor

0 commit comments

Comments
 (0)