CI 2019 von Daniel, Eugen und Michael
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
619 B

5 years ago
  1. import org.junit.Before;
  2. import org.junit.jupiter.api.Test;
  3. import static org.hamcrest.MatcherAssert.assertThat;
  4. import static org.hamcrest.core.IsEqual.equalTo;
  5. public class TestBmi {
  6. private Bmi bmi;
  7. @Before
  8. public void setup() {
  9. bmi = new Bmi();
  10. }
  11. @Test
  12. public void normalBmi() {
  13. //arrange
  14. Bmi bmi = new Bmi();
  15. float height = (float) 1.70;
  16. float weight = 70;
  17. int expectedResult = 24;
  18. //act
  19. int bmiResult = bmi.calculate(height, weight);
  20. //assert
  21. assertThat("", bmiResult, equalTo(expectedResult));
  22. }
  23. }