-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor exchange rate internals, set up unit tests
- Loading branch information
1 parent
901b804
commit d8227c9
Showing
6 changed files
with
95 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package exchangerate; | ||
import static org.junit.Assert.assertEquals; | ||
|
||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
public class ExchangeRateTest { | ||
|
||
@Before | ||
public void setUp(){ | ||
|
||
} | ||
|
||
@Test | ||
public void testConfigNotSet(){ | ||
assertEquals(5, 4); | ||
} | ||
|
||
@Test | ||
public void testConfigKeyNotSet(){ | ||
assertEquals(5, 4); | ||
} | ||
|
||
@Test | ||
public void testResponseFailure(){ | ||
assertEquals(5, 4); | ||
} | ||
|
||
|
||
@Test | ||
public void testRequest(){ | ||
assertEquals(5, 4); | ||
} | ||
|
||
@Test | ||
public void testResponse(){ | ||
assertEquals(5, 4); | ||
} | ||
|
||
@Test | ||
public void testExchangeRate(){ | ||
assertEquals(5, 4); | ||
} | ||
|
||
@Test | ||
public void testExchangeRateError(){ | ||
assertEquals(5, 4); | ||
} | ||
|
||
@Test | ||
public void testExchangeRateErrorWithoutFailureCallback(){ | ||
assertEquals(5, 4); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"Realtime Currency Exchange Rate": { | ||
"1. From_Currency Code": "BTC", | ||
"2. From_Currency Name": "Bitcoin", | ||
"3. To_Currency Code": "CNY", | ||
"4. To_Currency Name": "Chinese Yuan", | ||
"5. Exchange Rate": "62423.68125000", | ||
"6. Last Refreshed": "2020-05-03 20:32:20", | ||
"7. Time Zone": "UTC", | ||
"8. Bid Price": "62423.68125000", | ||
"9. Ask Price": "62423.75188500" | ||
} | ||
} |