Skip to content

Commit

Permalink
Moving pact specification submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
neilcampbell committed Aug 26, 2014
1 parent 66961f4 commit 9a512cb
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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<RequestTestCase>("..\\..\\Specification\\pact-specification\\testcases\\request");
var failedTestCases = RunPactSpecificationTests<RequestTestCase>("..\\..\\IntegrationTests\\Specification\\pact-specification\\testcases\\request");

if (failedTestCases.Any())
{
Expand All @@ -31,7 +31,7 @@ public void ValidateRequestSpecification()
[Fact]
public void ValidateResponseSpecification()
{
var failedTestCases = RunPactSpecificationTests<ResponseTestCase>("..\\..\\Specification\\pact-specification\\testcases\\response");
var failedTestCases = RunPactSpecificationTests<ResponseTestCase>("..\\..\\IntegrationTests\\Specification\\pact-specification\\testcases\\response");

if (failedTestCases.Any())
{
Expand Down Expand Up @@ -65,6 +65,7 @@ private IEnumerable<string> RunPactSpecificationTests<T>(string pathToTestCases)

try
{
Console.WriteLine("Running test: " + testCaseFileName);
testCase.Verify();
}
catch (SubstituteException)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PactNet.Tests.Specification.Models
namespace PactNet.Tests.IntegrationTests.Specification.Models
{
public interface IVerifiable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
17 changes: 13 additions & 4 deletions PactNet.Tests/PactNet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Fakes\FakeHttpClient.cs" />
<Compile Include="IntegrationTests\Specification\MockHttpServiceSpecificationTests.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IntegrationTests\Specification\Models\IVerifiable.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IntegrationTests\Specification\Models\RequestTestCase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IntegrationTests\Specification\Models\ResponseTestCase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Mocks\MockHttpService\Comparers\HttpQueryStringComparerTests.cs" />
<Compile Include="Mocks\MockHttpService\Mappers\EncodingMapperTests.cs" />
<Compile Include="Mocks\MockHttpService\Mappers\HttpBodyContentMapperTests.cs" />
Expand Down Expand Up @@ -89,10 +101,6 @@
<Compile Include="ProviderServicePactFileTests.cs" />
<Compile Include="PactVerifierTests.cs" />
<Compile Include="Reporters\ReporterTests.cs" />
<Compile Include="Specification\Models\IVerifiable.cs" />
<Compile Include="Specification\Models\RequestTestCase.cs" />
<Compile Include="Specification\Models\ResponseTestCase.cs" />
<Compile Include="Specification\MockHttpServiceSpecificationTests.cs" />
<Compile Include="Mocks\MockHttpService\Comparers\ProviderServiceResponseComparerTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Mocks\MockHttpService\Validators\ProviderServiceValidatorTests.cs" />
Expand All @@ -109,6 +117,7 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down

0 comments on commit 9a512cb

Please sign in to comment.