pact-foundation / pact-workshop-dotnet-core-v1

A workshop for Pact using .NET Core
Apache License 2.0
76 stars 209 forks source link

The following constructor parameters did not have matching fixture data: ConsumerPactClassFixture fixture #8

Closed subudear closed 3 days ago

subudear commented 6 years ago

Getting error when I try to run consumer test using "dotnet test" after Step 3.3.2 Appreciate any help to fix this issue-

\YourSolution\Consumer\tests> dotnet test Build started, please wait... Build completed.

Test run for C:\Users....\Source\Repos\Pactnet\pact-workshop-dotnet-core-v1\YourSolution\Consumer\tests\bin\Debug\netcoreapp2.1\tests.dll(.NETCoreApp,Version=v2.1) Microsoft (R) Test Execution Command Line Tool Version 15.8.0 Copyright (c) Microsoft Corporation. All rights reserved.

Starting test execution, please wait... [xUnit.net 00:01:00.1009644] tests.ConsumerPactTests.ItHandlesInvalidDateParam [FAIL] Failed tests.ConsumerPactTests.ItHandlesInvalidDateParam Error Message: System.AggregateException : One or more errors occurred. (One or more errors occurred. (No connection could be made because the target machine actively refused it)) (The following constructor parameters did not have matching fixture data: ConsumerPactClassFixture fixture) ---- System.AggregateException : One or more errors occurred. (No connection could be made because the target machine actively refused it) -------- System.Net.Http.HttpRequestException : No connection could be made because the target machine actively refused it ------------ System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it ---- The following constructor parameters did not have matching fixture data: ConsumerPactClassFixture fixture

abiwoods commented 5 years ago

I'm also getting this issue - on both the /YourSolution code at this point in the walkthrough, and when running dotnet test from /CompletedSolution/tests

qqxxyy commented 5 years ago

I'm also having the same issue. Did you guys find any way around this?

HelioVaGator commented 5 years ago

I am also getting the same error, in both MacOS and Linux version of pactnet. Any luck with the solution?

HelioVaGator commented 5 years ago

For me, it got solved by moving the project to a shallow path. Seems like ruby has a problem with the longer project path.

raschmitt commented 4 years ago

As suggested by @HelioVaGator, moving the repository to a shallow path also solved it for me. There's a bigger discussion about it here: https://github.com/pact-foundation/pact-net/issues/163

YOU54F commented 3 days ago

Now resolved in the latest version of pact-net 5 (and since 4.x) as they have since migrated to the rust core (rather than ruby) removing the restriction