Tagged Questions
4
votes
1answer
140 views
How do I make this code unit-testable?
I have a functionality that imports data into a database, based on an Excel workbook and some meta data (both user-supplied). The functionality implements interface IFunctionality which essentially ...
2
votes
2answers
161 views
How to use inversion of control within a strategy when using the strategy pattern
I am creating a skeleton application to demonstrate use of the Strategy design pattern and inversion of control inside a Strategy.
The application is the backend of a simple board game, which also ...
1
vote
1answer
38 views
Thoughts on the testability of my use case interactor?
So here is a class that executes the CreateAPerson use case. It takes a request object (which is a simple data structure), validates the request, creates a new person, and then returns a response ...
3
votes
1answer
160 views
Tips for Making this Code Testable
So I'm writing an abstraction layer that wraps a telephony RESTful service for sending text messages and making phone calls. I should build this in such a way that the low-level provider, in this case ...
4
votes
1answer
3k views
Review request: SalesTax problem
I have a small solution to the following hypothetical problem:
Basic sales tax is applicable at a rate of 10% on all goods, except books, food, and medical products that are exempt. Import duty is ...