- Read the guideline before start
You have some amount of cryptocurrency "Matecoin" in your online wallet.
You also bought a program (function get_exchange_rate_prediction
) that
can predict the exchange rate of your cryptocurrency for the next day.
Write tests for cryptocurrency_action
function. This function
takes current_rate
- current exchange rate of cryptocurrency. This
function should return:
"Buy more cryptocurrency"
, if predicted exchange rate is more than 5% higher from the current."Sell all your cryptocurrency"
, if predicted exchange rate is more than 5% lower from the current."Do nothing"
, if difference is not that much.
Mock get_exchange_rate_prediction
function.