From 50a965aa13c324f347ec8af67398409ee8fe3c37 Mon Sep 17 00:00:00 2001 From: MSeibert97 Date: Tue, 16 Jul 2019 13:24:15 +0200 Subject: [PATCH] =?UTF-8?q?Der=20siebte=20Commit.=20Weitere=20Testf=C3=A4l?= =?UTF-8?q?le.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 62 +++++++++++++++++++----------- src/FitnessTest_M_Test.java | 75 +++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 22 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c8352e8..9f26d36 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,9 +2,8 @@ - - + @@ -193,7 +192,7 @@ - + + + + + + - - + @@ -484,7 +494,7 @@ - + @@ -564,7 +574,8 @@ - @@ -648,15 +659,10 @@ - + - - - - - - - + + @@ -674,6 +680,18 @@ + + + + + + + + + + + + diff --git a/src/FitnessTest_M_Test.java b/src/FitnessTest_M_Test.java index e78ac64..f39c00d 100644 --- a/src/FitnessTest_M_Test.java +++ b/src/FitnessTest_M_Test.java @@ -26,4 +26,79 @@ public class FitnessTest_M_Test { //assert assertThat("", bmiResult, equalTo(expectedResult)); } + + @Test + public void mediumBmi() { + //arrange + FitnessTest_M fitnessTest_M = new FitnessTest_M(); + float height = (float) 1.80; + float weight = 90; + int expectedResult = 27; + + //act + int bmiResult = fitnessTest_M.calculateBmi(height, weight); + + //assert + assertThat("", bmiResult, equalTo(expectedResult)); + } + + @Test + public void heavyBmi() { + //arrange + FitnessTest_M fitnessTest_M = new FitnessTest_M(); + float height = (float) 1.60; + float weight = 100; + int expectedResult = 39; + + //act + int bmiResult = fitnessTest_M.calculateBmi(height, weight); + + //assert + assertThat("", bmiResult, equalTo(expectedResult)); + } + + @Test + public void lightBmi() { + //arrange + FitnessTest_M fitnessTest_M = new FitnessTest_M(); + float height = (float) 1.75; + float weight = 50; + int expectedResult = 16; + + //act + int bmiResult = fitnessTest_M.calculateBmi(height, weight); + + //assert + assertThat("", bmiResult, equalTo(expectedResult)); + } + + @Test + public void monsterBmi() { + //arrange + FitnessTest_M fitnessTest_M = new FitnessTest_M(); + float height = (float) 3.70; + float weight = 3000; + int expectedResult = 219; + + //act + int bmiResult = fitnessTest_M.calculateBmi(height, weight); + + //assert + assertThat("", bmiResult, equalTo(expectedResult)); + } + + @Test + public void antBmi() { + //arrange + FitnessTest_M fitnessTest_M = new FitnessTest_M(); + float height = (float) 0.20; + float weight = (float) 0.30; + int expectedResult = 7; + + //act + int bmiResult = fitnessTest_M.calculateBmi(height, weight); + + //assert + assertThat("", bmiResult, equalTo(expectedResult)); + } }