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 ...
4
votes
1answer
168 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 ...
3
votes
1answer
164 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 ...
2
votes
2answers
167 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
42 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 ...
0
votes
0answers
36 views

Node.js: Is this factory method a good approach?

We are beginning to learn Node.js and we are not always sure if we do it the right way. We have a strong object oriented background so the adoption is not always easy. Right now we implemented a ...