A historic currency conversion web service it is a web service that allows the retrieval of the exchange rate of 2 currencies from a specified past date. In order to prevent the user from sending a bad data to the service, I employed some simple measures to verify the user input.
In order to simulate error cases in the unit tests I needed to find a method to create a date that will always be in the future. Below you can see my solution:
The main idea is that you will never know for how much time your software will be used, so it's better to play it safe :-).
No comments :
Post a Comment