Hauch IT
5 years ago
7 changed files with 122 additions and 356 deletions
-
93.idea/libraries/Drools_6_2_0.xml
-
2.idea/misc.xml
-
256.idea/workspace.xml
-
1Alpha.iml
-
104src/FitnessTest_M_Test.java
-
9src/Main.java
-
5src/Tage_D.java
@ -1,93 +0,0 @@ |
|||
<component name="libraryTable"> |
|||
<library name="Drools-6.2.0"> |
|||
<CLASSES> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-decisiontables-6.2.0.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-jsr94-6.2.0.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-core-6.2.0.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-compiler-6.2.0.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-persistence-jpa-6.2.0.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-templates-6.2.0.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/kie-api-6.2.0.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/kie-internal-6.2.0.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-verifier-6.2.0.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/kie-ci-6.2.0.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/jboss-interceptors-api_1.1_spec-1.0.1.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/jboss-transaction-api_1.1_spec-1.0.1.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/aether-api-1.0.0.v20140518.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/aether-connector-basic-1.0.0.v20140518.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/aether-impl-1.0.0.v20140518.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/aether-transport-file-1.0.0.v20140518.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/aether-spi-1.0.0.v20140518.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/aether-transport-http-1.0.0.v20140518.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/aether-transport-wagon-1.0.0.v20140518.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/aether-util-1.0.0.v20140518.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/ant-1.8.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/ant-launcher-1.8.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/aopalliance-1.0.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/cdi-api-1.0-SP4.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/commons-logging-1.1.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/commons-codec-1.4.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/dom4j-1.6.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/antlr-runtime-3.5.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/ecj-4.3.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/httpclient-4.3.6.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/itext-2.1.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/guava-13.0.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/javassist-3.18.1-GA.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/javax.inject-1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/jcl-over-slf4j-1.7.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/httpcore-4.3.3.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/jsr250-api-1.0.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/maven-artifact-3.2.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/maven-aether-provider-3.2.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/jsoup-1.7.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/jsr94-1.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/maven-core-3.2.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/maven-model-builder-3.2.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/maven-model-3.2.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/maven-compat-3.2.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/maven-plugin-api-3.2.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/maven-repository-metadata-3.2.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/mvel2-2.2.4.Final.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/maven-settings-3.2.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/maven-settings-builder-3.2.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/plexus-cipher-1.4.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/plexus-component-annotations-1.5.5.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/org.eclipse.sisu.inject-0.0.0.M5.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/org.eclipse.sisu.plexus-0.0.0.M5.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/plexus-classworlds-2.5.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/plexus-interpolation-1.19.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/plexus-sec-dispatcher-1.3.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/poi-ooxml-3.10.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/poi-3.10.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/plexus-utils-3.0.17.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/sisu-guice-3.1.0-no_aop.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/slf4j-api-1.7.2.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/poi-ooxml-schemas-3.10.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/stax-api-1.0.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/wagon-http-2.0.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/wagon-http-shared4-2.0.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/wagon-provider-api-1.0.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/xml-apis-1.3.04.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/xpp3_min-1.1.4c.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/xmlpull-1.1.3.1.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/xmlbeans-2.3.0.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/xstream-1.4.7.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/protobuf-java-2.5.0.jar!/" /> |
|||
</CLASSES> |
|||
<JAVADOC /> |
|||
<SOURCES> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-compiler-6.2.0.Final-sources.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-core-6.2.0.Final-sources.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-decisiontables-6.2.0.Final-sources.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-jsr94-6.2.0.Final-sources.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-persistence-jpa-6.2.0.Final-sources.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-verifier-6.2.0.Final-sources.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/kie-api-6.2.0.Final-sources.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/drools-templates-6.2.0.Final-sources.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/kie-internal-6.2.0.Final-sources.jar!/" /> |
|||
<root url="jar://$PROJECT_DIR$/lib/kie-ci-6.2.0.Final-sources.jar!/" /> |
|||
</SOURCES> |
|||
</library> |
|||
</component> |
@ -1,6 +1,6 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK"> |
|||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> |
|||
<output url="file://$PROJECT_DIR$/out" /> |
|||
</component> |
|||
</project> |
@ -1,104 +0,0 @@ |
|||
import org.junit.Before; |
|||
import org.junit.Test; |
|||
|
|||
import static org.hamcrest.MatcherAssert.assertThat; |
|||
import static org.hamcrest.core.IsEqual.equalTo; |
|||
|
|||
public class FitnessTest_M_Test { |
|||
private FitnessTest_M fitnessTest_M; |
|||
|
|||
@Before |
|||
public void setup() { |
|||
fitnessTest_M = new FitnessTest_M(); |
|||
} |
|||
|
|||
@Test |
|||
public void normalBmi() { |
|||
//arrange |
|||
FitnessTest_M fitnessTest_M = new FitnessTest_M(); |
|||
float height = (float) 1.70; |
|||
float weight = 70; |
|||
int expectedResult = 24; |
|||
|
|||
//act |
|||
int bmiResult = fitnessTest_M.calculateBmi(height, weight); |
|||
|
|||
//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)); |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue