Skip to content

Commit

Permalink
Increasing test coverage (#126)
Browse files Browse the repository at this point in the history
* Creating CI action

* Fix test project dll path

* Adding more tests
  • Loading branch information
delias-silva authored Feb 10, 2021
1 parent 7b1c54c commit 9e4a8ff
Show file tree
Hide file tree
Showing 29 changed files with 1,882 additions and 1,510 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,38 @@ jobs:

# Setup NuGet
- name: Setup NuGet.exe
uses: NuGet/[email protected].2
uses: NuGet/[email protected].5

# Restore NuGet packages
- name: Restore NuGet packages
run: nuget restore px-dotnet.sln

# Build Solution
- name: Build Solution
run: msbuild px-dotnet.sln /p:Configuration=Release
run: msbuild px-dotnet.sln /p:Configuration=Debug

# Setup VSTest.console.exe
- name: Setup VSTest.console.exe
uses: darenm/Setup-VSTest@v1

# Run Tests
- name: Run Tests
run: vstest.console.exe MercadoPagoSDK.Test/bin/Release/MercadoPagoSDK.Test.dll /TestAdapterPath:packages/NUnit3TestAdapter.3.16.1
run: |
./packages/OpenCover.4.7.922/tools/OpenCover.Console.exe `
-target:"vstest.console.exe" `
-targetargs:"MercadoPagoSDK.Test/bin/Debug/MercadoPagoSDK.Test.dll /TestAdapterPath:packages/NUnit3TestAdapter.3.16.1" `
-filter:"+[*]*MercadoPago.Resources.* -[*]*Disbursement -[*]*DiscountCampaign -[*]*OAuth -[*]*Plan -[*]*Preapproval -[*]*Subscription" `
-mergebyhash `
-skipautoprops `
-register `
-output:"coverage.xml"
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }}
EMAIL: ${{ secrets.USER_EMAIL }}

# Upload coverage result
- name: Upload Coverage
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
5 changes: 0 additions & 5 deletions MercadoPagoSDK.Test/Data/MPConf_invalid_App.config

This file was deleted.

9 changes: 0 additions & 9 deletions MercadoPagoSDK.Test/Data/MPConf_valid_App.config

This file was deleted.

15 changes: 15 additions & 0 deletions MercadoPagoSDK.Test/Data/SDK.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ClientSecret" value="CLIENT_SECRET" />
<add key="ClientId" value="CLIENT_ID" />
<add key="AccessToken" value="ACCESS_TOKEN" />
<add key="AppId" value="APP_ID" />
<add key="RequestsTimeout" value="20" />
<add key="RequestsRetries" value="2" />
<add key="ProxyHostName" value="proxy" />
<add key="ProxyPort" value="8080" />
<add key="ProxyUsername" value="user" />
<add key="ProxyPassword" value="password" />
</appSettings>
</configuration>
26 changes: 0 additions & 26 deletions MercadoPagoSDK.Test/Exceptions/MPExceptionTest.cs

This file was deleted.

14 changes: 0 additions & 14 deletions MercadoPagoSDK.Test/Helpers/Authentication.cs

This file was deleted.

89 changes: 0 additions & 89 deletions MercadoPagoSDK.Test/Helpers/PaymentHelper.cs

This file was deleted.

Loading

0 comments on commit 9e4a8ff

Please sign in to comment.