I am building a gaming website for which i need c# developers to write the game server but i have select them first so below is the demo question.
Create an API that provide currency conversion functionality through some pre-configured sources like XE, Yahoo, Oanda. Each of these source expect FromCurrency, ToCurrency, Amount, Date parameters. Consider following points in the final solution.
a.) A request to the API will include the source and other parameters that are required by the source to process the request successfully.
b.) You can configure to disable any source at any time, without having to deploy the application again.
c.) Adding a new currency conversion source can also be seamlessly integrated. – Assume that some other team is also developing conversion service, Xchange, (similar to that of Oanda, Yahoo) and we want to support that service as well in our API.
d.) Consider scenario where some of the source require authentication of the caller application (our API). Assume that Yahoo services requires authentication of the caller via some end-point e.g. yahoo.com/currencyconvertor/login which will generate some token upon successful authentication which our application has to pass to Yahoo service on each request.
e.) Provide Unit Test to support the solution