bartschotten / com-pact

An alternative Pact implementation for .NET
MIT License
16 stars 6 forks source link

PactWriter writes to wrong path #15

Closed sfiodorov closed 4 years ago

sfiodorov commented 4 years ago

Have MessagePactBuilder with pactDir set to @"c:\pactDir" Call Builder.BuildAsync().Wait(); Expect : file created at c:\pactDir Result: c:\pactDir empty and file created at c:\ with directory as prefix.

Solution: Fix PactWriter line 34 from: File.WriteAllText($"{pactDir}{pact.Consumer.Name}-{pact.Provider.Name}.json", to: File.WriteAllText($"{pactDir}{Path.DirectorySeparatorChar}{pact.Consumer.Name}-{pact.Provider.Name}.json",

PS. It will be nice to open repository for subbranhcing , so we will be able so submit pr's

eNeRGy164 commented 4 years ago

PS. It will be nice to open repository for subbranhcing , so we will be able so submit pr's

You can fork the repo to create a PR?

sfiodorov commented 4 years ago

Created PR : https://github.com/bartschotten/com-pact/pull/16/commits/3b4c0bb6988f93a51310688be09ba67b2fc5c17c