Comments (4)
Thanks for the feedback. It's all about scoping the objects. The constructor to the GatewayException object is marked internal as it's not intended for creation outside of the SDK. In the same vein the ResponseCode and ResponseMessages setters are private as they're only intended to be set by the class constructor.
from dotnet-sdk.
What would be your recommended approach for unit testing when a Gateway exception is thrown?
from dotnet-sdk.
I am not super familiar with Mock and how it works, so apologies in advance if these are poor suggestions. In your above example code it looks like you just want it to throw a GatewayException with a set response code/message whenever you call "Execute()". Seems to me you could create your own GatewayException object (GatewayExceptionEx) and throw that instead?
from dotnet-sdk.
Thanks very much for the feedback and suggestion.
from dotnet-sdk.
Related Issues (20)
- 3DS2 - Check Version returned an error 403 Forbidden
- Find customer HOT 1
- InitiateAuthentication returning 502 Bad Gateway for MasterCard requests HOT 4
- Index out of range exception in ProcessAuthorization(AuthorizationBuilder builder)
- Is there a way to not use ServicesContainer.ConfigureService() statically ? HOT 3
- Running Debit Transaction through Pax System causes system to say "TAX IS NOT ALLOWED" HOT 3
- Failure on charging recurring payment with stored credit card. HOT 1
- Signature Image Cut Off on Pax devices
- DigitalWallet payment is not working when I use configName HOT 4
- Card storage properties are not showing when it's apple pay or google pay HOT 2
- Voiding a sale sends a 441 regardless of the type of sale HOT 1
- The name of the country is longer that 50 characters HOT 1
- Issue in NAK flow
- NAK Send issue
- Getting invalid base64 string when testing 3DS notification URLs HOT 2
- HPP_Iframe:Uncaught DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document. HOT 1
- Postcode Validation HOT 1
- Error on handling decimal values in different cultures.
- Could not load file or assembly 'CoreCompat.System.Drawing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c0a7ed9c2333b592'. The system cannot find the file specified. HOT 4
- ReportingService functionality loss in 5.0.2+ HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-sdk.