CurrencyConverterTest.java 455B

1234567891011121314151617181920212223
  1. import static org.junit.Assert.*;
  2. import org.junit.After;
  3. import org.junit.Before;
  4. import org.junit.Test;
  5. public class CurrencyConverterTest {
  6. @Test
  7. public void usDollarToEuroTest1(){
  8. //Given
  9. CurrencyConverter curr = new CurrencyConverter();
  10. double value = 1;
  11. //Then
  12. double expected = (double)0.94;
  13. double actual = curr.convertCurrency(1.00, 0.94, 1.00);
  14. //Assert
  15. assertEquals(expected,actual,0);
  16. }
  17. }