From 9a512cba5168a3d6595ab4235fa85a14f5371ead Mon Sep 17 00:00:00 2001 From: Neil Campbell Date: Tue, 26 Aug 2014 18:43:03 +1000 Subject: [PATCH] Moving pact specification submodule --- .gitmodules | 4 ++-- .../MockHttpServiceSpecificationTests.cs | 9 +++++---- .../Specification/Models/IVerifiable.cs | 2 +- .../Specification/Models/RequestTestCase.cs | 2 +- .../Specification/Models/ResponseTestCase.cs | 2 +- .../Specification/pact-specification | 0 PactNet.Tests/PactNet.Tests.csproj | 17 +++++++++++++---- 7 files changed, 23 insertions(+), 13 deletions(-) rename PactNet.Tests/{ => IntegrationTests}/Specification/MockHttpServiceSpecificationTests.cs (84%) rename PactNet.Tests/{ => IntegrationTests}/Specification/Models/IVerifiable.cs (50%) rename PactNet.Tests/{ => IntegrationTests}/Specification/Models/RequestTestCase.cs (91%) rename PactNet.Tests/{ => IntegrationTests}/Specification/Models/ResponseTestCase.cs (92%) rename PactNet.Tests/{ => IntegrationTests}/Specification/pact-specification (100%) diff --git a/.gitmodules b/.gitmodules index ade598d7..67baec22 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "PactNet.Tests/Specification/pact-specification"] - path = PactNet.Tests/Specification/pact-specification +[submodule "PactNet.Tests/IntegrationTests/Specification/pact-specification"] + path = PactNet.Tests/IntegrationTests/Specification/pact-specification url = https://github.com/bethesque/pact-specification.git diff --git a/PactNet.Tests/Specification/MockHttpServiceSpecificationTests.cs b/PactNet.Tests/IntegrationTests/Specification/MockHttpServiceSpecificationTests.cs similarity index 84% rename from PactNet.Tests/Specification/MockHttpServiceSpecificationTests.cs rename to PactNet.Tests/IntegrationTests/Specification/MockHttpServiceSpecificationTests.cs index 43fc8529..458aac99 100644 --- a/PactNet.Tests/Specification/MockHttpServiceSpecificationTests.cs +++ b/PactNet.Tests/IntegrationTests/Specification/MockHttpServiceSpecificationTests.cs @@ -4,17 +4,17 @@ using System.Linq; using NSubstitute.Exceptions; using Newtonsoft.Json; -using PactNet.Tests.Specification.Models; +using PactNet.Tests.IntegrationTests.Specification.Models; using Xunit; -namespace PactNet.Tests.Specification +namespace PactNet.Tests.IntegrationTests.Specification { public class MockHttpServiceSpecificationTests { [Fact] public void ValidateRequestSpecification() { - var failedTestCases = RunPactSpecificationTests("..\\..\\Specification\\pact-specification\\testcases\\request"); + var failedTestCases = RunPactSpecificationTests("..\\..\\IntegrationTests\\Specification\\pact-specification\\testcases\\request"); if (failedTestCases.Any()) { @@ -31,7 +31,7 @@ public void ValidateRequestSpecification() [Fact] public void ValidateResponseSpecification() { - var failedTestCases = RunPactSpecificationTests("..\\..\\Specification\\pact-specification\\testcases\\response"); + var failedTestCases = RunPactSpecificationTests("..\\..\\IntegrationTests\\Specification\\pact-specification\\testcases\\response"); if (failedTestCases.Any()) { @@ -65,6 +65,7 @@ private IEnumerable RunPactSpecificationTests(string pathToTestCases) try { + Console.WriteLine("Running test: " + testCaseFileName); testCase.Verify(); } catch (SubstituteException) diff --git a/PactNet.Tests/Specification/Models/IVerifiable.cs b/PactNet.Tests/IntegrationTests/Specification/Models/IVerifiable.cs similarity index 50% rename from PactNet.Tests/Specification/Models/IVerifiable.cs rename to PactNet.Tests/IntegrationTests/Specification/Models/IVerifiable.cs index 6af3d032..ab88722e 100644 --- a/PactNet.Tests/Specification/Models/IVerifiable.cs +++ b/PactNet.Tests/IntegrationTests/Specification/Models/IVerifiable.cs @@ -1,4 +1,4 @@ -namespace PactNet.Tests.Specification.Models +namespace PactNet.Tests.IntegrationTests.Specification.Models { public interface IVerifiable { diff --git a/PactNet.Tests/Specification/Models/RequestTestCase.cs b/PactNet.Tests/IntegrationTests/Specification/Models/RequestTestCase.cs similarity index 91% rename from PactNet.Tests/Specification/Models/RequestTestCase.cs rename to PactNet.Tests/IntegrationTests/Specification/Models/RequestTestCase.cs index bcfaf524..6c8a53ed 100644 --- a/PactNet.Tests/Specification/Models/RequestTestCase.cs +++ b/PactNet.Tests/IntegrationTests/Specification/Models/RequestTestCase.cs @@ -3,7 +3,7 @@ using PactNet.Mocks.MockHttpService.Models; using PactNet.Reporters; -namespace PactNet.Tests.Specification.Models +namespace PactNet.Tests.IntegrationTests.Specification.Models { public class RequestTestCase : IVerifiable { diff --git a/PactNet.Tests/Specification/Models/ResponseTestCase.cs b/PactNet.Tests/IntegrationTests/Specification/Models/ResponseTestCase.cs similarity index 92% rename from PactNet.Tests/Specification/Models/ResponseTestCase.cs rename to PactNet.Tests/IntegrationTests/Specification/Models/ResponseTestCase.cs index 3ba15f75..496c36ee 100644 --- a/PactNet.Tests/Specification/Models/ResponseTestCase.cs +++ b/PactNet.Tests/IntegrationTests/Specification/Models/ResponseTestCase.cs @@ -3,7 +3,7 @@ using PactNet.Mocks.MockHttpService.Models; using PactNet.Reporters; -namespace PactNet.Tests.Specification.Models +namespace PactNet.Tests.IntegrationTests.Specification.Models { public class ResponseTestCase : IVerifiable { diff --git a/PactNet.Tests/Specification/pact-specification b/PactNet.Tests/IntegrationTests/Specification/pact-specification similarity index 100% rename from PactNet.Tests/Specification/pact-specification rename to PactNet.Tests/IntegrationTests/Specification/pact-specification diff --git a/PactNet.Tests/PactNet.Tests.csproj b/PactNet.Tests/PactNet.Tests.csproj index bbd40879..4efcd8cb 100644 --- a/PactNet.Tests/PactNet.Tests.csproj +++ b/PactNet.Tests/PactNet.Tests.csproj @@ -62,6 +62,18 @@ + + Code + + + Code + + + Code + + + Code + @@ -89,10 +101,6 @@ - - - - @@ -109,6 +117,7 @@ +