This commit is contained in:
s464840 2022-06-20 14:04:23 +02:00
commit a2dd563c86
48 changed files with 16509 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/wprowadzenie do testowania projekt.iml" filepath="$PROJECT_DIR$/.idea/wprowadzenie do testowania projekt.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

View File

@ -0,0 +1,3 @@
.classpath
.project
target/

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8

View File

@ -0,0 +1,16 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@ -0,0 +1,29 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.epam.bootcamp</groupId>
<artifactId>bmi-calculator</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>bmi-calculator</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.0.1</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,79 @@
package com.epam.bootcamp.bmi_calculator;
import com.epam.bootcamp.bmi_calculator.interfacesImplements.*;
public class App extends Exception
{
private double weight;
private double height;
private double bmi;
/**
* A ZeroChecker megnézi, hogy nulla vagy kevesebb-e a súly vagy a magasság.
* Ha valamelyik nulla vagy kevesebb, akkor hibát dob.
*/
private void ZeroChecker() throws Exception{
if(this.weight <= 0){
throw new Exception("Weight is equals or less than zero.");
}
if(this.height <= 0){
throw new Exception("Height is equals or less than zero.");
}
}
/**
* Ez adja értéknek a BMI-t a bmi változónak.
* Először megnézi a ZeroCheckerrel a kapott értékeket.
* Meghívja a GuessTheUnits osztályt, ami kitalálja, hogy milyen mértékegységekkel számoljuk a BMI-t(US vagy metric).
* Attól függően, hogy mi a mértékegység, hívjuk meg a számolót.
* @return a bmi értékével tér vissza a metódus
* @throws Exception
*/
public double calculateBMI() throws Exception{ //végül kiszámoljuk a BMI-t
ZeroChecker();
GuessTheUnits gtu = new GuessTheUnits(this.height, this.weight);
if(gtu.getUnitType().equals("US")){
UsBMI ubmi = new UsBMI();
ubmi.setBMI(gtu.getWeight(), gtu.getHeight());
this.bmi = ubmi.getBMI();
}else if(gtu.getUnitType().equals("metric")){
MetricBMI mbmi = new MetricBMI();
mbmi.setBMI(gtu.getWeight(), gtu.getHeight());
this.bmi = mbmi.getBMI();
}
return this.bmi;
}
/**
* A bmi változó értékétől függően kapjuk meg az adott ember értékelését
* @return Egy string, ami tartalmazza az értékelést
*/
public String bmiResult(){
if(this.bmi < 18.5){ // Sovány
return "Thinness";
}else if(this.bmi >= 18.5 && this.bmi <= 24.9){ // Normál testalkatú
return "Normal";
}else if(this.bmi > 24.9 && this.bmi <= 29.9){ // Túlsúlyos
return "Overweight";
}else{ // Erősen túlsúlyos
return "Heavily overweight";
}
}
/**
* Súly beállítása
* @param weight a súly
*/
public void setWeight(double weight){
this.weight = weight;
}
/**
* Magasság beállítása
* @param height a magasság
*/
public void setHeight(double height){
this.height = height;
}
}

View File

@ -0,0 +1,104 @@
package com.epam.bootcamp.bmi_calculator;
public class GuessTheUnits{
private double height;
private double weight;
private String unitType;
/**
* Váltószám konstansok
*/
private static final double ouncesToPounds = 0.0625;
private static final double centimeterToMeter = 100;
private static final double feetToInch = 12;
public GuessTheUnits(double height, double weight) throws Exception{
this.height = height;
this.weight = weight;
guessUnit();
}
/**
* A mértékegység megállapító metódus.
* Ha a magasság kisebb száznál, és azon belül 10 és 3 között van, akkor feetben kaptuk a magasságot.
* Ha a magasság kisebb száznál, de nagyobb vagy egyenlő 10-el, akkor inchben.
* Ha a magasság kisebb vagy egyenlő 3-al, akkor méterben.
* Ha a magasság nagyobb száznál, akkor pedig centiméterben.
*
* A magasság alapján meg tudjuk mondani, hogy milyen mértékegységben kaphattuk a súlyt.
* Ha US mértékegységet használunk és a súly nagyobb mint ezer, akkor ounces-ban kaptuk meg a súlyt.
* Ha metrikus mértékegységet használunk, és a súly nagyobb mint ezer, valószínűleg két különböző mértékegységben
* kaptuk meg a magasságot és a súlyt, ezért hibát dob.
*
* Ha feetben, centiméterben vagy ounces-ban kaptuk valamelyik értéket, a convertUnit metódussal át kell alakítanunk azt.
* @throws Exception
*/
private void guessUnit() throws Exception{ // kitaláljuk a mértékegységet
if(this.height < 100){
if(this.height < 10 && this.height > 3){ // feet
convertUnit("feet"); //átkonvertáljuk inch-re
this.unitType = "US";
}else if(this.height >= 10){ // inch
this.unitType = "US";
}else{ // meter
this.unitType = "metric";
}
}else{ // centimeter
convertUnit("centimeter"); //átkonvertáljuk méterre
this.unitType = "metric";
}
if(this.unitType.equals("US")){ // ounces
if(this.weight > 1000){
convertUnit("ounces"); //átkonvertáljuk fontra
}
}else{
if(this.weight > 1000){
throw new Exception("Height and weight is in different metric.");
}
}
}
/**
* Átváltja a mértékegységeket egységesre.
* @param unit
*/
private void convertUnit(String unit){
if(unit.equals("ounces")){
this.weight = this.weight * ouncesToPounds;
}
if(unit.equals("feet")){
this.height = this.height * feetToInch;
}
if(unit.equals("centimeter")){
this.height = this.height / centimeterToMeter;
}
}
/**
* Súly getter
* @return a súly
*/
public double getWeight(){
return this.weight;
}
/**
* Magasság getter
* @return magasság
*/
public double getHeight(){
return this.height;
}
/**
* A mértékegység típusa getter
* @return mértékegység típusa
*/
public String getUnitType(){
return this.unitType;
}
}

View File

@ -0,0 +1,17 @@
package com.epam.bootcamp.bmi_calculator.interfaces;
/**
* Metrikus vagy US mértékegység interface
* @author bencekiraly
*
*/
public interface UnitsInterface{
double getBMI();
/**
* Itt számoljuk ki a testtömegindexet.
*/
void setBMI(double weight, double height);
}

View File

@ -0,0 +1,17 @@
package com.epam.bootcamp.bmi_calculator.interfacesImplements;
import com.epam.bootcamp.bmi_calculator.interfaces.UnitsInterface;
public class MetricBMI implements UnitsInterface{
private double bmi;
public double getBMI(){
return this.bmi;
}
public void setBMI(double weight, double height){
this.bmi = weight/(height*height); //számolja a metrikus BMI-t
}
}

View File

@ -0,0 +1,22 @@
package com.epam.bootcamp.bmi_calculator.interfacesImplements;
import com.epam.bootcamp.bmi_calculator.interfaces.UnitsInterface;
public class UsBMI implements UnitsInterface{
private static final int usMultiplier = 703;
private double bmi;
public double getBMI(){
return this.bmi;
}
/**
* A US mértékegységnél kell konstans, amilve meg kell szorozni a súlyt. Ezt a szorzót a usMultiplier konstans tartalmazza
*/
public void setBMI(double weight, double height){
this.bmi = usMultiplier*weight/(height*height); // számolja a US bmi-t
}
}

View File

@ -0,0 +1,372 @@
package com.epam.bootcamp.bmi_calculator;
import static org.junit.Assert.*;
import org.junit.*;
import org.junit.rules.ExpectedException;
import com.epam.bootcamp.bmi_calculator.interfacesImplements.MetricBMI;
public class BMITest {
App app;
/*@Test
public void GuessTheUnitsTest1() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(1.7,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest2() throws Exception{
}*/
@Before
public void setup(){
app = new App();
}
@Test
public void BMITest1() throws Exception{
app.setHeight(1.7);
app.setWeight(50);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest2() throws Exception{
try{
app.setHeight(0);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest39() throws Exception{
try{
app.setHeight(0.001);
app.setWeight(150.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest40() throws Exception{
try{
app.setHeight(0.00);
app.setWeight(150.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest12() throws Exception{
try{
app.setHeight(-0.01);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest13() throws Exception{
try{
app.setHeight(-1);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest14() throws Exception{
try{
app.setHeight(-11);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest3() throws Exception{
try{
app.setHeight(1);
app.setWeight(-3);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest37() throws Exception{
try{
app.setHeight(0);
app.setWeight(0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest38() throws Exception{
try{
app.setHeight(0);
app.setWeight(10);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest10() throws Exception{
try{
app.setHeight(1);
app.setWeight(-1);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest31() throws Exception{
try{
app.setHeight(0);
app.setWeight(1);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest32() throws Exception{
try{
app.setHeight(1);
app.setWeight(0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest33() throws Exception{
try{
app.setHeight(188);
app.setWeight(0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest34() throws Exception{
try{
app.setHeight(188);
app.setWeight(0.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest35() throws Exception{
try{
app.setHeight(0);
app.setWeight(123);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest36() throws Exception{
try{
app.setHeight(0.0);
app.setWeight(76);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest11() throws Exception{
try{
app.setHeight(1);
app.setWeight(-300000);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest4() throws Exception{
try{
app.setHeight(170);
app.setWeight(1764);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height and weight is in different metric.");
}
}
@Test
public void BMITest18() throws Exception{
try{
app.setHeight(5.9);
app.setWeight(60);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height and weight is in different metric.");
}
}
@Test
public void BMITest19() throws Exception{
try{
app.setHeight(5.1);
app.setWeight(-60);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest5() throws Exception{
app.setHeight(170);
app.setWeight(50.0);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest6() throws Exception{
app.setHeight(5.58);
app.setWeight(1764);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest7() throws Exception{
app.setHeight(86.7);
app.setWeight(6349.3);
assertEquals(app.calculateBMI(),37.19,0.5);
assertEquals(app.bmiResult(),"Heavily overweight");
}
@Test
public void BMITest8() throws Exception{
app.setHeight(6.56);
app.setWeight(220.47);
assertEquals(app.calculateBMI(),25,0.5);
assertEquals(app.bmiResult(),"Overweight");
}
@Test
public void BMITest15() throws Exception{
app.setHeight(6.56);
app.setWeight(2220.47);
assertEquals(app.calculateBMI(),15.743818755222017,0.5);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest16() throws Exception{
app.setHeight(1.56);
app.setWeight(220.47);
assertEquals(app.calculateBMI(),90.59418145956607,0.5);
assertEquals(app.bmiResult(),"Heavily overweight");
}
@Test
public void BMITest9() throws Exception{
app.setHeight(200);
app.setWeight(80);
assertEquals(app.calculateBMI(),20,0.0);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest17() throws Exception{
app.setHeight(210);
app.setWeight(83);
assertEquals(app.calculateBMI(),18.820861678004533,0.0);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest20() throws Exception{
app.setHeight(5.58);
app.setWeight(1788);
assertEquals(app.calculateBMI(),18.4,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest28() throws Exception{
app.setHeight(180);
app.setWeight(59.98);
assertEquals(app.calculateBMI(),18.5,1);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest21() throws Exception{
app.setHeight(180);
app.setWeight(59.5);
assertEquals(app.calculateBMI(),18.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest27() throws Exception{
app.setHeight(180);
app.setWeight(60.5);
assertEquals(app.calculateBMI(),18.3,1);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest22() throws Exception{
app.setHeight(180);
app.setWeight(80.3);
assertEquals(app.calculateBMI(),24.78,1);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest29() throws Exception{
app.setHeight(180);
app.setWeight(80.6);
assertEquals(app.calculateBMI(),24.9,1);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest25() throws Exception{
app.setHeight(180);
app.setWeight(81);
assertEquals(app.calculateBMI(),25,1);
assertEquals(app.bmiResult(),"Overweight");
}
@Test
public void BMITest23() throws Exception{
app.setHeight(180);
app.setWeight(96);
assertEquals(app.calculateBMI(),29.6,1);
assertEquals(app.bmiResult(),"Overweight");
}
@Test
public void BMITest30() throws Exception{
app.setHeight(180);
app.setWeight(96.8);
assertEquals(app.calculateBMI(),29.9,1);
assertEquals(app.bmiResult(),"Overweight");
}
@Test
public void BMITest24() throws Exception{
app.setHeight(180);
app.setWeight(99);
assertEquals(app.calculateBMI(),30.6,1);
assertEquals(app.bmiResult(),"Heavily overweight");
}
}

View File

@ -0,0 +1,127 @@
package com.epam.bootcamp.bmi_calculator;
import static org.junit.Assert.*;
import org.junit.*;
public class GuessTheUnitsTest {
@Test
public void GuessTheUnitsTest1() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(1.7,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest2() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(170,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest3() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(5.58,1764);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),110,1);
}
@Test
public void GuessTheUnitsTest4() throws Exception{
try{
GuessTheUnits gtu = new GuessTheUnits(170,1764);
assertEquals(gtu.getUnitType(),"US");
}catch(Exception e){
assertEquals(e.getMessage(),"Height and weight is in different metric.");
}
}
@Test
public void GuessTheUnitsTest5() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9.99,3.01);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),3.01,1);
}
@Test
public void GuessTheUnitsTest13() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(10,3.01);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),3.01,1);
}
@Test
public void GuessTheUnitsTest14() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(10.01,3.01);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),3.01,1);
}
@Test
public void GuessTheUnitsTest6() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9.99,2.99);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),3.01,1);
}
@Test
public void GuessTheUnitsTest7() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(99,999);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),999.0,1);
}
@Test
public void GuessTheUnitsTest8() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(101,20.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest9() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(100,1000);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest10() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(99,999);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest11() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(100,999);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest12() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(99,1000);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest15() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(10,1000);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest16() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9,1000);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest17() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9,1001);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest18() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9,999);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest19() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(3,1000);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest20() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(3.,600);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest21() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(3,1000);
assertEquals(gtu.getUnitType(),"metric");
}
}

View File

@ -0,0 +1,345 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>MetricBMI.java</h1>
<table class="src">
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_1'/>
1
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_1'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>package com.epam.bootcamp.bmi_calculator.interfacesImplements;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_2'/>
2
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_2'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_3'/>
3
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_3'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>import com.epam.bootcamp.bmi_calculator.interfaces.UnitsInterface;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_4'/>
4
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_4'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_5'/>
5
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_5'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>public class MetricBMI implements UnitsInterface{</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_6'/>
6
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_6'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_7'/>
7
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_7'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;private double bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_8'/>
8
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_8'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_9'/>
9
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_9'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public double getBMI(){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_10'/>
10
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_10'>1</a>
<span>
1. getBMI : replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/MetricBMI::getBMI &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;return this.bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_11'/>
11
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_11'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_12'/>
12
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_12'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_13'/>
13
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_13'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public void setBMI(double weight, double height){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_14'/>
14
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_14'>2</a>
<span>
1. setBMI : Replaced double multiplication with division &rarr; KILLED<br/>
2. setBMI : Replaced double division with multiplication &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;this.bmi = weight/(height*height); //sz&#225;molja a metrikus BMI-t</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_15'/>
15
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_15'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_16'/>
16
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_16'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@20cdb152_17'/>
17
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_17'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>}</span></pre></td></tr>
<tr><td></td><td></td><td><h2>Mutations</h2></td></tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@20cdb152_10'>10</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_10'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest5(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/MetricBMI::getBMI &rarr; KILLED</p>
</td>
</tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@20cdb152_14'>14</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@20cdb152_14'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest5(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double multiplication with division &rarr; KILLED</p> <p class='KILLED'><span class='pop'>2.<span><b>2</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest5(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double division with multiplication &rarr; KILLED</p>
</td>
</tr>
</table>
<h2>Active mutators</h2>
<ul>
<li class='mutator'>CONDITIONALS_BOUNDARY</li>
<li class='mutator'>EMPTY_RETURNS</li>
<li class='mutator'>FALSE_RETURNS</li>
<li class='mutator'>INCREMENTS</li>
<li class='mutator'>INVERT_NEGS</li>
<li class='mutator'>MATH</li>
<li class='mutator'>NEGATE_CONDITIONALS</li>
<li class='mutator'>NULL_RETURNS</li>
<li class='mutator'>PRIMITIVE_RETURNS</li>
<li class='mutator'>TRUE_RETURNS</li>
<li class='mutator'>VOID_METHOD_CALLS</li>
</ul>
<h2>Tests examined</h2>
<ul>
<li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest1(com.epam.bootcamp.bmi_calculator.BMITest) (8 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest5(com.epam.bootcamp.bmi_calculator.BMITest) (0 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest9(com.epam.bootcamp.bmi_calculator.BMITest) (0 ms)</li>
</ul>
<br/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,422 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>UsBMI.java</h1>
<table class="src">
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_1'/>
1
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_1'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>package com.epam.bootcamp.bmi_calculator.interfacesImplements;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_2'/>
2
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_2'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_3'/>
3
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_3'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>import com.epam.bootcamp.bmi_calculator.interfaces.UnitsInterface;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_4'/>
4
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_4'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_5'/>
5
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_5'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>public class UsBMI implements UnitsInterface{</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_6'/>
6
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_6'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_7'/>
7
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_7'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;private static final int usMultiplier = 703;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_8'/>
8
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_8'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_9'/>
9
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_9'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;private double bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_10'/>
10
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_10'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_11'/>
11
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_11'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public double getBMI(){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_12'/>
12
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_12'>1</a>
<span>
1. getBMI : replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/UsBMI::getBMI &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;return this.bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_13'/>
13
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_13'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_14'/>
14
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_14'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_15'/>
15
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_15'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;/**</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_16'/>
16
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_16'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9; * A US m&#233;rt&#233;kegys&#233;gn&#233;l kell konstans, amilve meg kell szorozni a s&#250;lyt. Ezt a szorz&#243;t a usMultiplier konstans tartalmazza</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_17'/>
17
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_17'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9; */</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_18'/>
18
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_18'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public void setBMI(double weight, double height){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_19'/>
19
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_19'>3</a>
<span>
1. setBMI : Replaced double multiplication with division &rarr; KILLED<br/>
2. setBMI : Replaced double multiplication with division &rarr; KILLED<br/>
3. setBMI : Replaced double division with multiplication &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;this.bmi = usMultiplier*weight/(height*height); // sz&#225;molja a US bmi-t</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_20'/>
20
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_20'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_21'/>
21
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_21'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@2eda2062_22'/>
22
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_22'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>}</span></pre></td></tr>
<tr><td></td><td></td><td><h2>Mutations</h2></td></tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@2eda2062_12'>12</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_12'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest8(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/UsBMI::getBMI &rarr; KILLED</p>
</td>
</tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@2eda2062_19'>19</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@2eda2062_19'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest8(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double multiplication with division &rarr; KILLED</p> <p class='KILLED'><span class='pop'>2.<span><b>2</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest8(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double multiplication with division &rarr; KILLED</p> <p class='KILLED'><span class='pop'>3.<span><b>3</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest8(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double division with multiplication &rarr; KILLED</p>
</td>
</tr>
</table>
<h2>Active mutators</h2>
<ul>
<li class='mutator'>CONDITIONALS_BOUNDARY</li>
<li class='mutator'>EMPTY_RETURNS</li>
<li class='mutator'>FALSE_RETURNS</li>
<li class='mutator'>INCREMENTS</li>
<li class='mutator'>INVERT_NEGS</li>
<li class='mutator'>MATH</li>
<li class='mutator'>NEGATE_CONDITIONALS</li>
<li class='mutator'>NULL_RETURNS</li>
<li class='mutator'>PRIMITIVE_RETURNS</li>
<li class='mutator'>TRUE_RETURNS</li>
<li class='mutator'>VOID_METHOD_CALLS</li>
</ul>
<h2>Tests examined</h2>
<ul>
<li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest7(com.epam.bootcamp.bmi_calculator.BMITest) (1 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest8(com.epam.bootcamp.bmi_calculator.BMITest) (0 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest6(com.epam.bootcamp.bmi_calculator.BMITest) (1 ms)</li>
</ul>
<br/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>Pit Test Coverage Report</h1>
<h2>Package Summary</h2>
<h3>com.epam.bootcamp.bmi_calculator.interfacesImplements</h3>
<table>
<thead>
<tr>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td>2</td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">8/8</div></div></td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
</tr>
</tbody>
</table>
<h3>Breakdown by Class</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="./MetricBMI.java.html">MetricBMI.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">3/3</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">3/3</div></div></td>
</tr>
<tr>
<td><a href="./UsBMI.java.html">UsBMI.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
</tr>
</tbody>
</table>
<br/>
<hr/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>Pit Test Coverage Report</h1>
<h2>Package Summary</h2>
<h3>com.epam.bootcamp.bmi_calculator</h3>
<table>
<thead>
<tr>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td>2</td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">61/61</div></div></td>
<td>72% <div class="coverage_bar"><div class="coverage_complete width-72"></div><div class="coverage_legend">36/50</div></div></td>
<td>72% <div class="coverage_bar"><div class="coverage_complete width-72"></div><div class="coverage_legend">36/50</div></div></td>
</tr>
</tbody>
</table>
<h3>Breakdown by Class</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="./App.java.html">App.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">28/28</div></div></td>
<td><div class="coverage_percentage">67% </div><div class="coverage_bar"><div class="coverage_complete width-67"></div><div class="coverage_legend">16/24</div></div></td>
<td><div class="coverage_percentage">67% </div><div class="coverage_bar"><div class="coverage_complete width-67"></div><div class="coverage_legend">16/24</div></div></td>
</tr>
<tr>
<td><a href="./GuessTheUnits.java.html">GuessTheUnits.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">33/33</div></div></td>
<td><div class="coverage_percentage">77% </div><div class="coverage_bar"><div class="coverage_complete width-77"></div><div class="coverage_legend">20/26</div></div></td>
<td><div class="coverage_percentage">77% </div><div class="coverage_bar"><div class="coverage_complete width-77"></div><div class="coverage_legend">20/26</div></div></td>
</tr>
</tbody>
</table>
<br/>
<hr/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,72 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>Pit Test Coverage Report</h1>
<h3>Project Summary</h3>
<table>
<thead>
<tr>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td>4</td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">69/69</div></div></td>
<td>75% <div class="coverage_bar"><div class="coverage_complete width-75"></div><div class="coverage_legend">43/57</div></div></td>
<td>75% <div class="coverage_bar"><div class="coverage_complete width-75"></div><div class="coverage_legend">43/57</div></div></td>
</tr>
</tbody>
</table>
<h3>Breakdown by Package</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="./com.epam.bootcamp.bmi_calculator/index.html">com.epam.bootcamp.bmi_calculator</a></td>
<td>2</td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">61/61</div></div></td>
<td><div class="coverage_percentage">72% </div><div class="coverage_bar"><div class="coverage_complete width-72"></div><div class="coverage_legend">36/50</div></div></td>
<td><div class="coverage_percentage">72% </div><div class="coverage_bar"><div class="coverage_complete width-72"></div><div class="coverage_legend">36/50</div></div></td>
</tr>
<tr>
<td><a href="./com.epam.bootcamp.bmi_calculator.interfacesImplements/index.html">com.epam.bootcamp.bmi_calculator.interfacesImplements</a></td>
<td>2</td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">8/8</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
</tr>
</tbody>
</table>
<br/>
<hr/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,563 @@
html, body, div, span, p, blockquote, pre {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body{
line-height: 1;
color: black;
background: white;
margin-left: 20px;
}
.src {
border: 1px solid #dddddd;
padding-top: 10px;
padding-right: 5px;
padding-left: 5px;
font-family: Consolas, Courier, monospace;
}
.covered, .COVERED {
background-color: #ddffdd;
}
.uncovered, .UNCOVERED {
background-color: #ffdddd;
}
.killed, .KILLED {
background-color: #aaffaa;
}
.survived, .SURVIVED {
background-color: #ffaaaa;
}
.uncertain, .UNCERTAIN {
background-color: #dde7ef;
}
.run_error, .RUN_ERROR {
background-color: #dde7ef;
}
.na {
background-color: #eeeeee;
}
.timed_out, .TIMED_OUT {
background-color: #dde7ef;
}
.non_viable, .NON_VIABLE {
background-color: #aaffaa;
}
.memory_error, .MEMORY_ERROR {
background-color: #dde7ef;
}
.not_started, .NO_STARTED {
background-color: #dde7ef; color : red
}
.no_coverage, .NO_COVERAGE {
background-color: #ffaaaa;
}
.tests {
width: 50%;
float: left;
}
.mutees {
float: right;
width: 50%;
}
.unit {
padding-top: 20px;
clear: both;
}
.coverage_bar {
display: inline-block;
height: 1.1em;
width: 130px;
background: #FAA;
margin: 0 5px;
vertical-align: middle;
border: 1px solid #AAA;
position: relative;
}
.coverage_complete {
display: inline-block;
height: 100%;
background: #DFD;
float: left;
}
.coverage_legend {
position: absolute;
height: 100%;
width: 100%;
left: 0;
top: 0;
text-align: center;
}
.line, .mut {
vertical-align: middle;
}
.coverage_percentage {
display: inline-block;
width: 3em;
text-align: right;
}
.pop {
outline:none;
}
.pop strong {
line-height: 30px;
}
.pop {
text-decoration: none;
}
.pop span {
z-index: 10;
display: none;
padding: 14px 20px;
margin-top: -30px;
margin-left: 28px;
width: 800px;
line-height: 16px;
word-wrap: break-word;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-moz-box-shadow: 5px 5px 8px #CCC;
-webkit-box-shadow: 5px 5px 8px #CCC;
box-shadow: 5px 5px 8px #CCC;
}
.pop:hover span {
display: inline;
position: absolute;
color: #111;
border: 1px solid #DCA;
background: #fffAF0;
}
.width-1 {
width: 1%;
}
.width-2 {
width: 2%;
}
.width-3 {
width: 3%;
}
.width-4 {
width: 4%;
}
.width-5 {
width: 5%;
}
.width-6 {
width: 6%;
}
.width-7 {
width: 7%;
}
.width-8 {
width: 8%;
}
.width-9 {
width: 9%;
}
.width-10 {
width: 10%;
}
.width-11 {
width: 11%;
}
.width-12 {
width: 12%;
}
.width-13 {
width: 13%;
}
.width-14 {
width: 14%;
}
.width-15 {
width: 15%;
}
.width-16 {
width: 16%;
}
.width-17 {
width: 17%;
}
.width-18 {
width: 18%;
}
.width-19 {
width: 19%;
}
.width-20 {
width: 20%;
}
.width-21 {
width: 21%;
}
.width-22 {
width: 22%;
}
.width-23 {
width: 23%;
}
.width-24 {
width: 24%;
}
.width-25 {
width: 25%;
}
.width-26 {
width: 26%;
}
.width-27 {
width: 27%;
}
.width-28 {
width: 28%;
}
.width-29 {
width: 29%;
}
.width-30 {
width: 30%;
}
.width-31 {
width: 31%;
}
.width-32 {
width: 32%;
}
.width-33 {
width: 33%;
}
.width-34 {
width: 34%;
}
.width-35 {
width: 35%;
}
.width-36 {
width: 36%;
}
.width-37 {
width: 37%;
}
.width-38 {
width: 38%;
}
.width-39 {
width: 39%;
}
.width-40 {
width: 40%;
}
.width-41 {
width: 41%;
}
.width-42 {
width: 42%;
}
.width-43 {
width: 43%;
}
.width-44 {
width: 44%;
}
.width-45 {
width: 45%;
}
.width-46 {
width: 46%;
}
.width-47 {
width: 47%;
}
.width-48 {
width: 48%;
}
.width-49 {
width: 49%;
}
.width-50 {
width: 50%;
}
.width-51 {
width: 51%;
}
.width-52 {
width: 52%;
}
.width-53 {
width: 53%;
}
.width-54 {
width: 54%;
}
.width-55 {
width: 55%;
}
.width-56 {
width: 56%;
}
.width-57 {
width: 57%;
}
.width-58 {
width: 58%;
}
.width-59 {
width: 59%;
}
.width-60 {
width: 60%;
}
.width-61 {
width: 61%;
}
.width-62 {
width: 62%;
}
.width-63 {
width: 63%;
}
.width-64 {
width: 64%;
}
.width-65 {
width: 65%;
}
.width-66 {
width: 66%;
}
.width-67 {
width: 67%;
}
.width-68 {
width: 68%;
}
.width-69 {
width: 69%;
}
.width-70 {
width: 70%;
}
.width-71 {
width: 71%;
}
.width-72 {
width: 72%;
}
.width-73 {
width: 73%;
}
.width-74 {
width: 74%;
}
.width-75 {
width: 75%;
}
.width-76 {
width: 76%;
}
.width-77 {
width: 77%;
}
.width-78 {
width: 78%;
}
.width-79 {
width: 79%;
}
.width-80 {
width: 80%;
}
.width-81 {
width: 81%;
}
.width-82 {
width: 82%;
}
.width-83 {
width: 83%;
}
.width-84 {
width: 84%;
}
.width-85 {
width: 85%;
}
.width-86 {
width: 86%;
}
.width-87 {
width: 87%;
}
.width-88 {
width: 88%;
}
.width-89 {
width: 89%;
}
.width-90 {
width: 90%;
}
.width-91 {
width: 91%;
}
.width-92 {
width: 92%;
}
.width-93 {
width: 93%;
}
.width-94 {
width: 94%;
}
.width-95 {
width: 95%;
}
.width-96 {
width: 96%;
}
.width-97 {
width: 97%;
}
.width-98 {
width: 98%;
}
.width-99 {
width: 99%;
}
.width-100 {
width: 100%;
}

View File

@ -0,0 +1,345 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>MetricBMI.java</h1>
<table class="src">
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_1'/>
1
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_1'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>package com.epam.bootcamp.bmi_calculator.interfacesImplements;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_2'/>
2
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_2'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_3'/>
3
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_3'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>import com.epam.bootcamp.bmi_calculator.interfaces.UnitsInterface;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_4'/>
4
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_4'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_5'/>
5
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_5'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>public class MetricBMI implements UnitsInterface{</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_6'/>
6
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_6'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_7'/>
7
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_7'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;private double bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_8'/>
8
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_8'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_9'/>
9
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_9'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public double getBMI(){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_10'/>
10
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_10'>1</a>
<span>
1. getBMI : replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/MetricBMI::getBMI &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;return this.bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_11'/>
11
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_11'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_12'/>
12
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_12'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_13'/>
13
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_13'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public void setBMI(double weight, double height){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_14'/>
14
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_14'>2</a>
<span>
1. setBMI : Replaced double multiplication with division &rarr; KILLED<br/>
2. setBMI : Replaced double division with multiplication &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;this.bmi = weight/(height*height); //sz&#225;molja a metrikus BMI-t</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_15'/>
15
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_15'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_16'/>
16
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_16'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_17'/>
17
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_17'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>}</span></pre></td></tr>
<tr><td></td><td></td><td><h2>Mutations</h2></td></tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_10'>10</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_10'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest16(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/MetricBMI::getBMI &rarr; KILLED</p>
</td>
</tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@4fa86cb8_14'>14</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@4fa86cb8_14'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest16(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double multiplication with division &rarr; KILLED</p> <p class='KILLED'><span class='pop'>2.<span><b>2</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest16(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double division with multiplication &rarr; KILLED</p>
</td>
</tr>
</table>
<h2>Active mutators</h2>
<ul>
<li class='mutator'>CONDITIONALS_BOUNDARY</li>
<li class='mutator'>EMPTY_RETURNS</li>
<li class='mutator'>FALSE_RETURNS</li>
<li class='mutator'>INCREMENTS</li>
<li class='mutator'>INVERT_NEGS</li>
<li class='mutator'>MATH</li>
<li class='mutator'>NEGATE_CONDITIONALS</li>
<li class='mutator'>NULL_RETURNS</li>
<li class='mutator'>PRIMITIVE_RETURNS</li>
<li class='mutator'>TRUE_RETURNS</li>
<li class='mutator'>VOID_METHOD_CALLS</li>
</ul>
<h2>Tests examined</h2>
<ul>
<li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest16(com.epam.bootcamp.bmi_calculator.BMITest) (0 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest1(com.epam.bootcamp.bmi_calculator.BMITest) (7 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest5(com.epam.bootcamp.bmi_calculator.BMITest) (1 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest17(com.epam.bootcamp.bmi_calculator.BMITest) (2 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest9(com.epam.bootcamp.bmi_calculator.BMITest) (15 ms)</li>
</ul>
<br/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,422 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>UsBMI.java</h1>
<table class="src">
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_1'/>
1
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_1'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>package com.epam.bootcamp.bmi_calculator.interfacesImplements;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_2'/>
2
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_2'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_3'/>
3
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_3'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>import com.epam.bootcamp.bmi_calculator.interfaces.UnitsInterface;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_4'/>
4
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_4'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_5'/>
5
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_5'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>public class UsBMI implements UnitsInterface{</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_6'/>
6
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_6'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_7'/>
7
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_7'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;private static final int usMultiplier = 703;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_8'/>
8
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_8'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_9'/>
9
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_9'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;private double bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_10'/>
10
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_10'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_11'/>
11
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_11'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public double getBMI(){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_12'/>
12
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_12'>1</a>
<span>
1. getBMI : replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/UsBMI::getBMI &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;return this.bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_13'/>
13
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_13'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_14'/>
14
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_14'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_15'/>
15
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_15'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;/**</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_16'/>
16
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_16'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9; * A US m&#233;rt&#233;kegys&#233;gn&#233;l kell konstans, amilve meg kell szorozni a s&#250;lyt. Ezt a szorz&#243;t a usMultiplier konstans tartalmazza</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_17'/>
17
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_17'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9; */</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_18'/>
18
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_18'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public void setBMI(double weight, double height){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_19'/>
19
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_19'>3</a>
<span>
1. setBMI : Replaced double multiplication with division &rarr; KILLED<br/>
2. setBMI : Replaced double multiplication with division &rarr; KILLED<br/>
3. setBMI : Replaced double division with multiplication &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;this.bmi = usMultiplier*weight/(height*height); // sz&#225;molja a US bmi-t</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_20'/>
20
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_20'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_21'/>
21
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_21'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@35cec305_22'/>
22
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_22'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>}</span></pre></td></tr>
<tr><td></td><td></td><td><h2>Mutations</h2></td></tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@35cec305_12'>12</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_12'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest7(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/UsBMI::getBMI &rarr; KILLED</p>
</td>
</tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@35cec305_19'>19</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@35cec305_19'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest7(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double multiplication with division &rarr; KILLED</p> <p class='KILLED'><span class='pop'>2.<span><b>2</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest7(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double multiplication with division &rarr; KILLED</p> <p class='KILLED'><span class='pop'>3.<span><b>3</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest7(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double division with multiplication &rarr; KILLED</p>
</td>
</tr>
</table>
<h2>Active mutators</h2>
<ul>
<li class='mutator'>CONDITIONALS_BOUNDARY</li>
<li class='mutator'>EMPTY_RETURNS</li>
<li class='mutator'>FALSE_RETURNS</li>
<li class='mutator'>INCREMENTS</li>
<li class='mutator'>INVERT_NEGS</li>
<li class='mutator'>MATH</li>
<li class='mutator'>NEGATE_CONDITIONALS</li>
<li class='mutator'>NULL_RETURNS</li>
<li class='mutator'>PRIMITIVE_RETURNS</li>
<li class='mutator'>TRUE_RETURNS</li>
<li class='mutator'>VOID_METHOD_CALLS</li>
</ul>
<h2>Tests examined</h2>
<ul>
<li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest7(com.epam.bootcamp.bmi_calculator.BMITest) (1 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest8(com.epam.bootcamp.bmi_calculator.BMITest) (3 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest15(com.epam.bootcamp.bmi_calculator.BMITest) (5 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest6(com.epam.bootcamp.bmi_calculator.BMITest) (13 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest18(com.epam.bootcamp.bmi_calculator.BMITest) (1 ms)</li>
</ul>
<br/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>Pit Test Coverage Report</h1>
<h2>Package Summary</h2>
<h3>com.epam.bootcamp.bmi_calculator.interfacesImplements</h3>
<table>
<thead>
<tr>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td>2</td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">8/8</div></div></td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
</tr>
</tbody>
</table>
<h3>Breakdown by Class</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="./MetricBMI.java.html">MetricBMI.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">3/3</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">3/3</div></div></td>
</tr>
<tr>
<td><a href="./UsBMI.java.html">UsBMI.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
</tr>
</tbody>
</table>
<br/>
<hr/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>Pit Test Coverage Report</h1>
<h2>Package Summary</h2>
<h3>com.epam.bootcamp.bmi_calculator</h3>
<table>
<thead>
<tr>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td>2</td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">61/61</div></div></td>
<td>76% <div class="coverage_bar"><div class="coverage_complete width-76"></div><div class="coverage_legend">38/50</div></div></td>
<td>76% <div class="coverage_bar"><div class="coverage_complete width-76"></div><div class="coverage_legend">38/50</div></div></td>
</tr>
</tbody>
</table>
<h3>Breakdown by Class</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="./App.java.html">App.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">28/28</div></div></td>
<td><div class="coverage_percentage">67% </div><div class="coverage_bar"><div class="coverage_complete width-67"></div><div class="coverage_legend">16/24</div></div></td>
<td><div class="coverage_percentage">67% </div><div class="coverage_bar"><div class="coverage_complete width-67"></div><div class="coverage_legend">16/24</div></div></td>
</tr>
<tr>
<td><a href="./GuessTheUnits.java.html">GuessTheUnits.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">33/33</div></div></td>
<td><div class="coverage_percentage">85% </div><div class="coverage_bar"><div class="coverage_complete width-85"></div><div class="coverage_legend">22/26</div></div></td>
<td><div class="coverage_percentage">85% </div><div class="coverage_bar"><div class="coverage_complete width-85"></div><div class="coverage_legend">22/26</div></div></td>
</tr>
</tbody>
</table>
<br/>
<hr/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,72 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>Pit Test Coverage Report</h1>
<h3>Project Summary</h3>
<table>
<thead>
<tr>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td>4</td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">69/69</div></div></td>
<td>79% <div class="coverage_bar"><div class="coverage_complete width-79"></div><div class="coverage_legend">45/57</div></div></td>
<td>79% <div class="coverage_bar"><div class="coverage_complete width-79"></div><div class="coverage_legend">45/57</div></div></td>
</tr>
</tbody>
</table>
<h3>Breakdown by Package</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="./com.epam.bootcamp.bmi_calculator/index.html">com.epam.bootcamp.bmi_calculator</a></td>
<td>2</td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">61/61</div></div></td>
<td><div class="coverage_percentage">76% </div><div class="coverage_bar"><div class="coverage_complete width-76"></div><div class="coverage_legend">38/50</div></div></td>
<td><div class="coverage_percentage">76% </div><div class="coverage_bar"><div class="coverage_complete width-76"></div><div class="coverage_legend">38/50</div></div></td>
</tr>
<tr>
<td><a href="./com.epam.bootcamp.bmi_calculator.interfacesImplements/index.html">com.epam.bootcamp.bmi_calculator.interfacesImplements</a></td>
<td>2</td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">8/8</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
</tr>
</tbody>
</table>
<br/>
<hr/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,563 @@
html, body, div, span, p, blockquote, pre {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body{
line-height: 1;
color: black;
background: white;
margin-left: 20px;
}
.src {
border: 1px solid #dddddd;
padding-top: 10px;
padding-right: 5px;
padding-left: 5px;
font-family: Consolas, Courier, monospace;
}
.covered, .COVERED {
background-color: #ddffdd;
}
.uncovered, .UNCOVERED {
background-color: #ffdddd;
}
.killed, .KILLED {
background-color: #aaffaa;
}
.survived, .SURVIVED {
background-color: #ffaaaa;
}
.uncertain, .UNCERTAIN {
background-color: #dde7ef;
}
.run_error, .RUN_ERROR {
background-color: #dde7ef;
}
.na {
background-color: #eeeeee;
}
.timed_out, .TIMED_OUT {
background-color: #dde7ef;
}
.non_viable, .NON_VIABLE {
background-color: #aaffaa;
}
.memory_error, .MEMORY_ERROR {
background-color: #dde7ef;
}
.not_started, .NO_STARTED {
background-color: #dde7ef; color : red
}
.no_coverage, .NO_COVERAGE {
background-color: #ffaaaa;
}
.tests {
width: 50%;
float: left;
}
.mutees {
float: right;
width: 50%;
}
.unit {
padding-top: 20px;
clear: both;
}
.coverage_bar {
display: inline-block;
height: 1.1em;
width: 130px;
background: #FAA;
margin: 0 5px;
vertical-align: middle;
border: 1px solid #AAA;
position: relative;
}
.coverage_complete {
display: inline-block;
height: 100%;
background: #DFD;
float: left;
}
.coverage_legend {
position: absolute;
height: 100%;
width: 100%;
left: 0;
top: 0;
text-align: center;
}
.line, .mut {
vertical-align: middle;
}
.coverage_percentage {
display: inline-block;
width: 3em;
text-align: right;
}
.pop {
outline:none;
}
.pop strong {
line-height: 30px;
}
.pop {
text-decoration: none;
}
.pop span {
z-index: 10;
display: none;
padding: 14px 20px;
margin-top: -30px;
margin-left: 28px;
width: 800px;
line-height: 16px;
word-wrap: break-word;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-moz-box-shadow: 5px 5px 8px #CCC;
-webkit-box-shadow: 5px 5px 8px #CCC;
box-shadow: 5px 5px 8px #CCC;
}
.pop:hover span {
display: inline;
position: absolute;
color: #111;
border: 1px solid #DCA;
background: #fffAF0;
}
.width-1 {
width: 1%;
}
.width-2 {
width: 2%;
}
.width-3 {
width: 3%;
}
.width-4 {
width: 4%;
}
.width-5 {
width: 5%;
}
.width-6 {
width: 6%;
}
.width-7 {
width: 7%;
}
.width-8 {
width: 8%;
}
.width-9 {
width: 9%;
}
.width-10 {
width: 10%;
}
.width-11 {
width: 11%;
}
.width-12 {
width: 12%;
}
.width-13 {
width: 13%;
}
.width-14 {
width: 14%;
}
.width-15 {
width: 15%;
}
.width-16 {
width: 16%;
}
.width-17 {
width: 17%;
}
.width-18 {
width: 18%;
}
.width-19 {
width: 19%;
}
.width-20 {
width: 20%;
}
.width-21 {
width: 21%;
}
.width-22 {
width: 22%;
}
.width-23 {
width: 23%;
}
.width-24 {
width: 24%;
}
.width-25 {
width: 25%;
}
.width-26 {
width: 26%;
}
.width-27 {
width: 27%;
}
.width-28 {
width: 28%;
}
.width-29 {
width: 29%;
}
.width-30 {
width: 30%;
}
.width-31 {
width: 31%;
}
.width-32 {
width: 32%;
}
.width-33 {
width: 33%;
}
.width-34 {
width: 34%;
}
.width-35 {
width: 35%;
}
.width-36 {
width: 36%;
}
.width-37 {
width: 37%;
}
.width-38 {
width: 38%;
}
.width-39 {
width: 39%;
}
.width-40 {
width: 40%;
}
.width-41 {
width: 41%;
}
.width-42 {
width: 42%;
}
.width-43 {
width: 43%;
}
.width-44 {
width: 44%;
}
.width-45 {
width: 45%;
}
.width-46 {
width: 46%;
}
.width-47 {
width: 47%;
}
.width-48 {
width: 48%;
}
.width-49 {
width: 49%;
}
.width-50 {
width: 50%;
}
.width-51 {
width: 51%;
}
.width-52 {
width: 52%;
}
.width-53 {
width: 53%;
}
.width-54 {
width: 54%;
}
.width-55 {
width: 55%;
}
.width-56 {
width: 56%;
}
.width-57 {
width: 57%;
}
.width-58 {
width: 58%;
}
.width-59 {
width: 59%;
}
.width-60 {
width: 60%;
}
.width-61 {
width: 61%;
}
.width-62 {
width: 62%;
}
.width-63 {
width: 63%;
}
.width-64 {
width: 64%;
}
.width-65 {
width: 65%;
}
.width-66 {
width: 66%;
}
.width-67 {
width: 67%;
}
.width-68 {
width: 68%;
}
.width-69 {
width: 69%;
}
.width-70 {
width: 70%;
}
.width-71 {
width: 71%;
}
.width-72 {
width: 72%;
}
.width-73 {
width: 73%;
}
.width-74 {
width: 74%;
}
.width-75 {
width: 75%;
}
.width-76 {
width: 76%;
}
.width-77 {
width: 77%;
}
.width-78 {
width: 78%;
}
.width-79 {
width: 79%;
}
.width-80 {
width: 80%;
}
.width-81 {
width: 81%;
}
.width-82 {
width: 82%;
}
.width-83 {
width: 83%;
}
.width-84 {
width: 84%;
}
.width-85 {
width: 85%;
}
.width-86 {
width: 86%;
}
.width-87 {
width: 87%;
}
.width-88 {
width: 88%;
}
.width-89 {
width: 89%;
}
.width-90 {
width: 90%;
}
.width-91 {
width: 91%;
}
.width-92 {
width: 92%;
}
.width-93 {
width: 93%;
}
.width-94 {
width: 94%;
}
.width-95 {
width: 95%;
}
.width-96 {
width: 96%;
}
.width-97 {
width: 97%;
}
.width-98 {
width: 98%;
}
.width-99 {
width: 99%;
}
.width-100 {
width: 100%;
}

View File

@ -0,0 +1,345 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>MetricBMI.java</h1>
<table class="src">
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_1'/>
1
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_1'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>package com.epam.bootcamp.bmi_calculator.interfacesImplements;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_2'/>
2
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_2'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_3'/>
3
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_3'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>import com.epam.bootcamp.bmi_calculator.interfaces.UnitsInterface;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_4'/>
4
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_4'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_5'/>
5
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_5'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>public class MetricBMI implements UnitsInterface{</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_6'/>
6
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_6'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_7'/>
7
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_7'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;private double bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_8'/>
8
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_8'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_9'/>
9
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_9'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public double getBMI(){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_10'/>
10
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_10'>1</a>
<span>
1. getBMI : replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/MetricBMI::getBMI &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;return this.bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_11'/>
11
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_11'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_12'/>
12
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_12'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_13'/>
13
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_13'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public void setBMI(double weight, double height){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_14'/>
14
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_14'>2</a>
<span>
1. setBMI : Replaced double multiplication with division &rarr; KILLED<br/>
2. setBMI : Replaced double division with multiplication &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;this.bmi = weight/(height*height); //sz&#225;molja a metrikus BMI-t</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_15'/>
15
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_15'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_16'/>
16
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_16'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@491cafec_17'/>
17
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_17'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>}</span></pre></td></tr>
<tr><td></td><td></td><td><h2>Mutations</h2></td></tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@491cafec_10'>10</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_10'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest27(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/MetricBMI::getBMI &rarr; KILLED</p>
</td>
</tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@491cafec_14'>14</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@491cafec_14'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest27(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double multiplication with division &rarr; KILLED</p> <p class='KILLED'><span class='pop'>2.<span><b>2</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest27(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double division with multiplication &rarr; KILLED</p>
</td>
</tr>
</table>
<h2>Active mutators</h2>
<ul>
<li class='mutator'>CONDITIONALS_BOUNDARY</li>
<li class='mutator'>EMPTY_RETURNS</li>
<li class='mutator'>FALSE_RETURNS</li>
<li class='mutator'>INCREMENTS</li>
<li class='mutator'>INVERT_NEGS</li>
<li class='mutator'>MATH</li>
<li class='mutator'>NEGATE_CONDITIONALS</li>
<li class='mutator'>NULL_RETURNS</li>
<li class='mutator'>PRIMITIVE_RETURNS</li>
<li class='mutator'>TRUE_RETURNS</li>
<li class='mutator'>VOID_METHOD_CALLS</li>
</ul>
<h2>Tests examined</h2>
<ul>
<li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest23(com.epam.bootcamp.bmi_calculator.BMITest) (2 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest30(com.epam.bootcamp.bmi_calculator.BMITest) (12 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest27(com.epam.bootcamp.bmi_calculator.BMITest) (0 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest17(com.epam.bootcamp.bmi_calculator.BMITest) (7 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest9(com.epam.bootcamp.bmi_calculator.BMITest) (0 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest21(com.epam.bootcamp.bmi_calculator.BMITest) (2 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest39(com.epam.bootcamp.bmi_calculator.BMITest) (0 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest29(com.epam.bootcamp.bmi_calculator.BMITest) (0 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest24(com.epam.bootcamp.bmi_calculator.BMITest) (2 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest16(com.epam.bootcamp.bmi_calculator.BMITest) (6 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest1(com.epam.bootcamp.bmi_calculator.BMITest) (13 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest5(com.epam.bootcamp.bmi_calculator.BMITest) (4 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest22(com.epam.bootcamp.bmi_calculator.BMITest) (1 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest28(com.epam.bootcamp.bmi_calculator.BMITest) (1 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest25(com.epam.bootcamp.bmi_calculator.BMITest) (5 ms)</li>
</ul>
<br/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,422 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>UsBMI.java</h1>
<table class="src">
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_1'/>
1
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_1'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>package com.epam.bootcamp.bmi_calculator.interfacesImplements;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_2'/>
2
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_2'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_3'/>
3
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_3'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>import com.epam.bootcamp.bmi_calculator.interfaces.UnitsInterface;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_4'/>
4
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_4'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''></span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_5'/>
5
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_5'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>public class UsBMI implements UnitsInterface{</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_6'/>
6
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_6'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_7'/>
7
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_7'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;private static final int usMultiplier = 703;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_8'/>
8
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_8'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_9'/>
9
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_9'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;private double bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_10'/>
10
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_10'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_11'/>
11
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_11'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public double getBMI(){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_12'/>
12
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_12'>1</a>
<span>
1. getBMI : replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/UsBMI::getBMI &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;return this.bmi;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_13'/>
13
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_13'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_14'/>
14
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_14'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_15'/>
15
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_15'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;/**</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_16'/>
16
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_16'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9; * A US m&#233;rt&#233;kegys&#233;gn&#233;l kell konstans, amilve meg kell szorozni a s&#250;lyt. Ezt a szorz&#243;t a usMultiplier konstans tartalmazza</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_17'/>
17
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_17'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9; */</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_18'/>
18
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_18'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;public void setBMI(double weight, double height){</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_19'/>
19
</td>
<td class='killed'>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_19'>3</a>
<span>
1. setBMI : Replaced double multiplication with division &rarr; KILLED<br/>
2. setBMI : Replaced double multiplication with division &rarr; KILLED<br/>
3. setBMI : Replaced double division with multiplication &rarr; KILLED<br/>
</span>
</span>
</td>
<td class='covered'><pre><span class='killed'>&#9;&#9;this.bmi = usMultiplier*weight/(height*height); // sz&#225;molja a US bmi-t</span></pre></td></tr>
<tr>
<td class='covered'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_20'/>
20
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_20'></a>
<span>
</span>
</span>
</td>
<td class='covered'><pre><span class=''>&#9;}</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_21'/>
21
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_21'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>&#9;</span></pre></td></tr>
<tr>
<td class='na'>
<a name='org.pitest.mutationtest.report.html.SourceFile@1d6a8386_22'/>
22
</td>
<td class=''>
<span class='pop'>
<a href='#grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_22'></a>
<span>
</span>
</span>
</td>
<td class=''><pre><span class=''>}</span></pre></td></tr>
<tr><td></td><td></td><td><h2>Mutations</h2></td></tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@1d6a8386_12'>12</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_12'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest7(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/UsBMI::getBMI &rarr; KILLED</p>
</td>
</tr>
<tr>
<td><a href='#org.pitest.mutationtest.report.html.SourceFile@1d6a8386_19'>19</a></td>
<td></td>
<td>
<a name='grouporg.pitest.mutationtest.report.html.SourceFile@1d6a8386_19'/>
<p class='KILLED'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest7(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double multiplication with division &rarr; KILLED</p> <p class='KILLED'><span class='pop'>2.<span><b>2</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest7(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double multiplication with division &rarr; KILLED</p> <p class='KILLED'><span class='pop'>3.<span><b>3</b><br/><b>Location : </b>setBMI<br/><b>Killed by : </b>com.epam.bootcamp.bmi_calculator.BMITest.BMITest7(com.epam.bootcamp.bmi_calculator.BMITest)</span></span> Replaced double division with multiplication &rarr; KILLED</p>
</td>
</tr>
</table>
<h2>Active mutators</h2>
<ul>
<li class='mutator'>CONDITIONALS_BOUNDARY</li>
<li class='mutator'>EMPTY_RETURNS</li>
<li class='mutator'>FALSE_RETURNS</li>
<li class='mutator'>INCREMENTS</li>
<li class='mutator'>INVERT_NEGS</li>
<li class='mutator'>MATH</li>
<li class='mutator'>NEGATE_CONDITIONALS</li>
<li class='mutator'>NULL_RETURNS</li>
<li class='mutator'>PRIMITIVE_RETURNS</li>
<li class='mutator'>TRUE_RETURNS</li>
<li class='mutator'>VOID_METHOD_CALLS</li>
</ul>
<h2>Tests examined</h2>
<ul>
<li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest7(com.epam.bootcamp.bmi_calculator.BMITest) (0 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest8(com.epam.bootcamp.bmi_calculator.BMITest) (0 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest20(com.epam.bootcamp.bmi_calculator.BMITest) (16 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest6(com.epam.bootcamp.bmi_calculator.BMITest) (1 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest15(com.epam.bootcamp.bmi_calculator.BMITest) (19 ms)</li><li>com.epam.bootcamp.bmi_calculator.BMITest.BMITest18(com.epam.bootcamp.bmi_calculator.BMITest) (3 ms)</li>
</ul>
<br/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>Pit Test Coverage Report</h1>
<h2>Package Summary</h2>
<h3>com.epam.bootcamp.bmi_calculator.interfacesImplements</h3>
<table>
<thead>
<tr>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td>2</td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">8/8</div></div></td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
</tr>
</tbody>
</table>
<h3>Breakdown by Class</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="./MetricBMI.java.html">MetricBMI.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">3/3</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">3/3</div></div></td>
</tr>
<tr>
<td><a href="./UsBMI.java.html">UsBMI.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">4/4</div></div></td>
</tr>
</tbody>
</table>
<br/>
<hr/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<h1>Pit Test Coverage Report</h1>
<h2>Package Summary</h2>
<h3>com.epam.bootcamp.bmi_calculator</h3>
<table>
<thead>
<tr>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td>2</td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">61/61</div></div></td>
<td>82% <div class="coverage_bar"><div class="coverage_complete width-82"></div><div class="coverage_legend">41/50</div></div></td>
<td>82% <div class="coverage_bar"><div class="coverage_complete width-82"></div><div class="coverage_legend">41/50</div></div></td>
</tr>
</tbody>
</table>
<h3>Breakdown by Class</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="./App.java.html">App.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">28/28</div></div></td>
<td><div class="coverage_percentage">71% </div><div class="coverage_bar"><div class="coverage_complete width-71"></div><div class="coverage_legend">17/24</div></div></td>
<td><div class="coverage_percentage">71% </div><div class="coverage_bar"><div class="coverage_complete width-71"></div><div class="coverage_legend">17/24</div></div></td>
</tr>
<tr>
<td><a href="./GuessTheUnits.java.html">GuessTheUnits.java</a></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">33/33</div></div></td>
<td><div class="coverage_percentage">92% </div><div class="coverage_bar"><div class="coverage_complete width-92"></div><div class="coverage_legend">24/26</div></div></td>
<td><div class="coverage_percentage">92% </div><div class="coverage_bar"><div class="coverage_complete width-92"></div><div class="coverage_legend">24/26</div></div></td>
</tr>
</tbody>
</table>
<br/>
<hr/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,72 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1250">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>Pit Test Coverage Report</h1>
<h3>Project Summary</h3>
<table>
<thead>
<tr>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td>4</td>
<td>100% <div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">69/69</div></div></td>
<td>84% <div class="coverage_bar"><div class="coverage_complete width-84"></div><div class="coverage_legend">48/57</div></div></td>
<td>84% <div class="coverage_bar"><div class="coverage_complete width-84"></div><div class="coverage_legend">48/57</div></div></td>
</tr>
</tbody>
</table>
<h3>Breakdown by Package</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Number of Classes</th>
<th>Line Coverage</th>
<th>Mutation Coverage</th>
<th>Test Strength</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="./com.epam.bootcamp.bmi_calculator/index.html">com.epam.bootcamp.bmi_calculator</a></td>
<td>2</td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">61/61</div></div></td>
<td><div class="coverage_percentage">82% </div><div class="coverage_bar"><div class="coverage_complete width-82"></div><div class="coverage_legend">41/50</div></div></td>
<td><div class="coverage_percentage">82% </div><div class="coverage_bar"><div class="coverage_complete width-82"></div><div class="coverage_legend">41/50</div></div></td>
</tr>
<tr>
<td><a href="./com.epam.bootcamp.bmi_calculator.interfacesImplements/index.html">com.epam.bootcamp.bmi_calculator.interfacesImplements</a></td>
<td>2</td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">8/8</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
<td><div class="coverage_percentage">100% </div><div class="coverage_bar"><div class="coverage_complete width-100"></div><div class="coverage_legend">7/7</div></div></td>
</tr>
</tbody>
</table>
<br/>
<hr/>
Report generated by <a href='http://pitest.org'>PIT</a> 1.8.1
</body>
</html>

View File

@ -0,0 +1,563 @@
html, body, div, span, p, blockquote, pre {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body{
line-height: 1;
color: black;
background: white;
margin-left: 20px;
}
.src {
border: 1px solid #dddddd;
padding-top: 10px;
padding-right: 5px;
padding-left: 5px;
font-family: Consolas, Courier, monospace;
}
.covered, .COVERED {
background-color: #ddffdd;
}
.uncovered, .UNCOVERED {
background-color: #ffdddd;
}
.killed, .KILLED {
background-color: #aaffaa;
}
.survived, .SURVIVED {
background-color: #ffaaaa;
}
.uncertain, .UNCERTAIN {
background-color: #dde7ef;
}
.run_error, .RUN_ERROR {
background-color: #dde7ef;
}
.na {
background-color: #eeeeee;
}
.timed_out, .TIMED_OUT {
background-color: #dde7ef;
}
.non_viable, .NON_VIABLE {
background-color: #aaffaa;
}
.memory_error, .MEMORY_ERROR {
background-color: #dde7ef;
}
.not_started, .NO_STARTED {
background-color: #dde7ef; color : red
}
.no_coverage, .NO_COVERAGE {
background-color: #ffaaaa;
}
.tests {
width: 50%;
float: left;
}
.mutees {
float: right;
width: 50%;
}
.unit {
padding-top: 20px;
clear: both;
}
.coverage_bar {
display: inline-block;
height: 1.1em;
width: 130px;
background: #FAA;
margin: 0 5px;
vertical-align: middle;
border: 1px solid #AAA;
position: relative;
}
.coverage_complete {
display: inline-block;
height: 100%;
background: #DFD;
float: left;
}
.coverage_legend {
position: absolute;
height: 100%;
width: 100%;
left: 0;
top: 0;
text-align: center;
}
.line, .mut {
vertical-align: middle;
}
.coverage_percentage {
display: inline-block;
width: 3em;
text-align: right;
}
.pop {
outline:none;
}
.pop strong {
line-height: 30px;
}
.pop {
text-decoration: none;
}
.pop span {
z-index: 10;
display: none;
padding: 14px 20px;
margin-top: -30px;
margin-left: 28px;
width: 800px;
line-height: 16px;
word-wrap: break-word;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-moz-box-shadow: 5px 5px 8px #CCC;
-webkit-box-shadow: 5px 5px 8px #CCC;
box-shadow: 5px 5px 8px #CCC;
}
.pop:hover span {
display: inline;
position: absolute;
color: #111;
border: 1px solid #DCA;
background: #fffAF0;
}
.width-1 {
width: 1%;
}
.width-2 {
width: 2%;
}
.width-3 {
width: 3%;
}
.width-4 {
width: 4%;
}
.width-5 {
width: 5%;
}
.width-6 {
width: 6%;
}
.width-7 {
width: 7%;
}
.width-8 {
width: 8%;
}
.width-9 {
width: 9%;
}
.width-10 {
width: 10%;
}
.width-11 {
width: 11%;
}
.width-12 {
width: 12%;
}
.width-13 {
width: 13%;
}
.width-14 {
width: 14%;
}
.width-15 {
width: 15%;
}
.width-16 {
width: 16%;
}
.width-17 {
width: 17%;
}
.width-18 {
width: 18%;
}
.width-19 {
width: 19%;
}
.width-20 {
width: 20%;
}
.width-21 {
width: 21%;
}
.width-22 {
width: 22%;
}
.width-23 {
width: 23%;
}
.width-24 {
width: 24%;
}
.width-25 {
width: 25%;
}
.width-26 {
width: 26%;
}
.width-27 {
width: 27%;
}
.width-28 {
width: 28%;
}
.width-29 {
width: 29%;
}
.width-30 {
width: 30%;
}
.width-31 {
width: 31%;
}
.width-32 {
width: 32%;
}
.width-33 {
width: 33%;
}
.width-34 {
width: 34%;
}
.width-35 {
width: 35%;
}
.width-36 {
width: 36%;
}
.width-37 {
width: 37%;
}
.width-38 {
width: 38%;
}
.width-39 {
width: 39%;
}
.width-40 {
width: 40%;
}
.width-41 {
width: 41%;
}
.width-42 {
width: 42%;
}
.width-43 {
width: 43%;
}
.width-44 {
width: 44%;
}
.width-45 {
width: 45%;
}
.width-46 {
width: 46%;
}
.width-47 {
width: 47%;
}
.width-48 {
width: 48%;
}
.width-49 {
width: 49%;
}
.width-50 {
width: 50%;
}
.width-51 {
width: 51%;
}
.width-52 {
width: 52%;
}
.width-53 {
width: 53%;
}
.width-54 {
width: 54%;
}
.width-55 {
width: 55%;
}
.width-56 {
width: 56%;
}
.width-57 {
width: 57%;
}
.width-58 {
width: 58%;
}
.width-59 {
width: 59%;
}
.width-60 {
width: 60%;
}
.width-61 {
width: 61%;
}
.width-62 {
width: 62%;
}
.width-63 {
width: 63%;
}
.width-64 {
width: 64%;
}
.width-65 {
width: 65%;
}
.width-66 {
width: 66%;
}
.width-67 {
width: 67%;
}
.width-68 {
width: 68%;
}
.width-69 {
width: 69%;
}
.width-70 {
width: 70%;
}
.width-71 {
width: 71%;
}
.width-72 {
width: 72%;
}
.width-73 {
width: 73%;
}
.width-74 {
width: 74%;
}
.width-75 {
width: 75%;
}
.width-76 {
width: 76%;
}
.width-77 {
width: 77%;
}
.width-78 {
width: 78%;
}
.width-79 {
width: 79%;
}
.width-80 {
width: 80%;
}
.width-81 {
width: 81%;
}
.width-82 {
width: 82%;
}
.width-83 {
width: 83%;
}
.width-84 {
width: 84%;
}
.width-85 {
width: 85%;
}
.width-86 {
width: 86%;
}
.width-87 {
width: 87%;
}
.width-88 {
width: 88%;
}
.width-89 {
width: 89%;
}
.width-90 {
width: 90%;
}
.width-91 {
width: 91%;
}
.width-92 {
width: 92%;
}
.width-93 {
width: 93%;
}
.width-94 {
width: 94%;
}
.width-95 {
width: 95%;
}
.width-96 {
width: 96%;
}
.width-97 {
width: 97%;
}
.width-98 {
width: 98%;
}
.width-99 {
width: 99%;
}
.width-100 {
width: 100%;
}

View File

@ -0,0 +1,202 @@
package com.epam.bootcamp.bmi_calculator;
import static org.junit.Assert.*;
import org.junit.*;
import org.junit.rules.ExpectedException;
import com.epam.bootcamp.bmi_calculator.interfacesImplements.MetricBMI;
public class BMITest {
App app;
/*@Test
public void GuessTheUnitsTest1() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(1.7,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest2() throws Exception{
}*/
@Before
public void setup(){
app = new App();
}
@Test
public void BMITest1() throws Exception{
app.setHeight(1.7);
app.setWeight(50);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest2() throws Exception{
try{
app.setHeight(0);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest12() throws Exception{
try{
app.setHeight(-0.01);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest13() throws Exception{
try{
app.setHeight(-1);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest14() throws Exception{
try{
app.setHeight(-11);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest3() throws Exception{
try{
app.setHeight(1);
app.setWeight(-3);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest10() throws Exception{
try{
app.setHeight(1);
app.setWeight(-1);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest11() throws Exception{
try{
app.setHeight(1);
app.setWeight(-300000);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest4() throws Exception{
try{
app.setHeight(170);
app.setWeight(1764);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height and weight is in different metric.");
}
}
@Test
public void BMITest18() throws Exception{
try{
app.setHeight(5.9);
app.setWeight(60);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height and weight is in different metric.");
}
}
@Test
public void BMITest19() throws Exception{
try{
app.setHeight(5.1);
app.setWeight(-60);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest5() throws Exception{
app.setHeight(170);
app.setWeight(50.0);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest6() throws Exception{
app.setHeight(5.58);
app.setWeight(1764);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest7() throws Exception{
app.setHeight(86.7);
app.setWeight(6349.3);
assertEquals(app.calculateBMI(),37.19,0.5);
assertEquals(app.bmiResult(),"Heavily overweight");
}
@Test
public void BMITest8() throws Exception{
app.setHeight(6.56);
app.setWeight(220.47);
assertEquals(app.calculateBMI(),25,0.5);
assertEquals(app.bmiResult(),"Overweight");
}
@Test
public void BMITest15() throws Exception{
app.setHeight(6.56);
app.setWeight(2220.47);
assertEquals(app.calculateBMI(),15.743818755222017,0.5);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest16() throws Exception{
app.setHeight(1.56);
app.setWeight(220.47);
assertEquals(app.calculateBMI(),90.59418145956607,0.5);
assertEquals(app.bmiResult(),"Heavily overweight");
}
@Test
public void BMITest9() throws Exception{
app.setHeight(200);
app.setWeight(80);
assertEquals(app.calculateBMI(),20,0.0);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest17() throws Exception{
app.setHeight(210);
app.setWeight(83);
assertEquals(app.calculateBMI(),18.820861678004533,0.0);
assertEquals(app.bmiResult(),"Normal");
}
}

View File

@ -0,0 +1,80 @@
package com.epam.bootcamp.bmi_calculator;
import static org.junit.Assert.*;
import org.junit.*;
public class GuessTheUnitsTest {
@Test
public void GuessTheUnitsTest1() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(1.7,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest2() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(170,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest3() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(5.58,1764);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),110,1);
}
@Test
public void GuessTheUnitsTest4() throws Exception{
try{
GuessTheUnits gtu = new GuessTheUnits(170,1764);
assertEquals(gtu.getUnitType(),"US");
}catch(Exception e){
assertEquals(e.getMessage(),"Height and weight is in different metric.");
}
}
@Test
public void GuessTheUnitsTest5() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9.99,3.01);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),3.01,1);
}
@Test
public void GuessTheUnitsTest6() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9.99,2.99);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),3.01,1);
}
@Test
public void GuessTheUnitsTest7() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(99,999);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),999.0,1);
}
@Test
public void GuessTheUnitsTest8() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(101,20.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest9() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(100,1000);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest10() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(99,999);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest11() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(100,999);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest12() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(99,1000);
assertEquals(gtu.getUnitType(),"US");
}
}

View File

@ -0,0 +1,372 @@
package com.epam.bootcamp.bmi_calculator;
import static org.junit.Assert.*;
import org.junit.*;
import org.junit.rules.ExpectedException;
import com.epam.bootcamp.bmi_calculator.interfacesImplements.MetricBMI;
public class BMITest {
App app;
/*@Test
public void GuessTheUnitsTest1() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(1.7,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest2() throws Exception{
}*/
@Before
public void setup(){
app = new App();
}
@Test
public void BMITest1() throws Exception{
app.setHeight(1.7);
app.setWeight(50);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest2() throws Exception{
try{
app.setHeight(0);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest39() throws Exception{
try{
app.setHeight(0.001);
app.setWeight(150.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest40() throws Exception{
try{
app.setHeight(0.00);
app.setWeight(150.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest12() throws Exception{
try{
app.setHeight(-0.01);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest13() throws Exception{
try{
app.setHeight(-1);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest14() throws Exception{
try{
app.setHeight(-11);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest3() throws Exception{
try{
app.setHeight(1);
app.setWeight(-3);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest37() throws Exception{
try{
app.setHeight(0);
app.setWeight(0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest38() throws Exception{
try{
app.setHeight(0);
app.setWeight(10);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest10() throws Exception{
try{
app.setHeight(1);
app.setWeight(-1);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest31() throws Exception{
try{
app.setHeight(0);
app.setWeight(1);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest32() throws Exception{
try{
app.setHeight(1);
app.setWeight(0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest33() throws Exception{
try{
app.setHeight(188);
app.setWeight(0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest34() throws Exception{
try{
app.setHeight(188);
app.setWeight(0.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest35() throws Exception{
try{
app.setHeight(0);
app.setWeight(123);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest36() throws Exception{
try{
app.setHeight(0.0);
app.setWeight(76);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest11() throws Exception{
try{
app.setHeight(1);
app.setWeight(-300000);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest4() throws Exception{
try{
app.setHeight(170);
app.setWeight(1764);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height and weight is in different metric.");
}
}
@Test
public void BMITest18() throws Exception{
try{
app.setHeight(5.9);
app.setWeight(60);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height and weight is in different metric.");
}
}
@Test
public void BMITest19() throws Exception{
try{
app.setHeight(5.1);
app.setWeight(-60);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest5() throws Exception{
app.setHeight(170);
app.setWeight(50.0);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest6() throws Exception{
app.setHeight(5.58);
app.setWeight(1764);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest7() throws Exception{
app.setHeight(86.7);
app.setWeight(6349.3);
assertEquals(app.calculateBMI(),37.19,0.5);
assertEquals(app.bmiResult(),"Heavily overweight");
}
@Test
public void BMITest8() throws Exception{
app.setHeight(6.56);
app.setWeight(220.47);
assertEquals(app.calculateBMI(),25,0.5);
assertEquals(app.bmiResult(),"Overweight");
}
@Test
public void BMITest15() throws Exception{
app.setHeight(6.56);
app.setWeight(2220.47);
assertEquals(app.calculateBMI(),15.743818755222017,0.5);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest16() throws Exception{
app.setHeight(1.56);
app.setWeight(220.47);
assertEquals(app.calculateBMI(),90.59418145956607,0.5);
assertEquals(app.bmiResult(),"Heavily overweight");
}
@Test
public void BMITest9() throws Exception{
app.setHeight(200);
app.setWeight(80);
assertEquals(app.calculateBMI(),20,0.0);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest17() throws Exception{
app.setHeight(210);
app.setWeight(83);
assertEquals(app.calculateBMI(),18.820861678004533,0.0);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest20() throws Exception{
app.setHeight(5.58);
app.setWeight(1788);
assertEquals(app.calculateBMI(),18.4,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest28() throws Exception{
app.setHeight(180);
app.setWeight(59.98);
assertEquals(app.calculateBMI(),18.5,1);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest21() throws Exception{
app.setHeight(180);
app.setWeight(59.5);
assertEquals(app.calculateBMI(),18.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest27() throws Exception{
app.setHeight(180);
app.setWeight(60.5);
assertEquals(app.calculateBMI(),18.3,1);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest22() throws Exception{
app.setHeight(180);
app.setWeight(80.3);
assertEquals(app.calculateBMI(),24.78,1);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest29() throws Exception{
app.setHeight(180);
app.setWeight(80.6);
assertEquals(app.calculateBMI(),24.9,1);
assertEquals(app.bmiResult(),"Normal");
}
@Test
public void BMITest25() throws Exception{
app.setHeight(180);
app.setWeight(81);
assertEquals(app.calculateBMI(),25,1);
assertEquals(app.bmiResult(),"Overweight");
}
@Test
public void BMITest23() throws Exception{
app.setHeight(180);
app.setWeight(96);
assertEquals(app.calculateBMI(),29.6,1);
assertEquals(app.bmiResult(),"Overweight");
}
@Test
public void BMITest30() throws Exception{
app.setHeight(180);
app.setWeight(96.8);
assertEquals(app.calculateBMI(),29.9,1);
assertEquals(app.bmiResult(),"Overweight");
}
@Test
public void BMITest24() throws Exception{
app.setHeight(180);
app.setWeight(99);
assertEquals(app.calculateBMI(),30.6,1);
assertEquals(app.bmiResult(),"Heavily overweight");
}
}

View File

@ -0,0 +1,127 @@
package com.epam.bootcamp.bmi_calculator;
import static org.junit.Assert.*;
import org.junit.*;
public class GuessTheUnitsTest {
@Test
public void GuessTheUnitsTest1() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(1.7,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest2() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(170,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest3() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(5.58,1764);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),110,1);
}
@Test
public void GuessTheUnitsTest4() throws Exception{
try{
GuessTheUnits gtu = new GuessTheUnits(170,1764);
assertEquals(gtu.getUnitType(),"US");
}catch(Exception e){
assertEquals(e.getMessage(),"Height and weight is in different metric.");
}
}
@Test
public void GuessTheUnitsTest5() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9.99,3.01);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),3.01,1);
}
@Test
public void GuessTheUnitsTest13() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(10,3.01);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),3.01,1);
}
@Test
public void GuessTheUnitsTest14() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(10.01,3.01);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),3.01,1);
}
@Test
public void GuessTheUnitsTest6() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9.99,2.99);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),3.01,1);
}
@Test
public void GuessTheUnitsTest7() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(99,999);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),999.0,1);
}
@Test
public void GuessTheUnitsTest8() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(101,20.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest9() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(100,1000);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest10() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(99,999);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest11() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(100,999);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest12() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(99,1000);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest15() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(10,1000);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest16() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9,1000);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest17() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9,1001);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest18() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(9,999);
assertEquals(gtu.getUnitType(),"US");
}
@Test
public void GuessTheUnitsTest19() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(3,1000);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest20() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(3.,600);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest21() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(3,1000);
assertEquals(gtu.getUnitType(),"metric");
}
}

View File

@ -0,0 +1,111 @@
package com.epam.bootcamp.bmi_calculator;
import static org.junit.Assert.*;
import org.junit.*;
import org.junit.rules.ExpectedException;
import com.epam.bootcamp.bmi_calculator.interfacesImplements.MetricBMI;
public class BMITest {
App app;
/*@Test
public void GuessTheUnitsTest1() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(1.7,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest2() throws Exception{
}*/
@Before
public void setup(){
app = new App();
}
@Test
public void BMITest1() throws Exception{
app.setHeight(1.7);
app.setWeight(50);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest2() throws Exception{
try{
app.setHeight(0);
app.setWeight(50.0);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height is equals or less than zero.");
}
}
@Test
public void BMITest3() throws Exception{
try{
app.setHeight(1);
app.setWeight(-3);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Weight is equals or less than zero.");
}
}
@Test
public void BMITest4() throws Exception{
try{
app.setHeight(170);
app.setWeight(1764);
app.calculateBMI();
}catch(Exception e){
assertEquals(e.getMessage(),"Height and weight is in different metric.");
}
}
@Test
public void BMITest5() throws Exception{
app.setHeight(170);
app.setWeight(50.0);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest6() throws Exception{
app.setHeight(5.58);
app.setWeight(1764);
assertEquals(app.calculateBMI(),17.3,1);
assertEquals(app.bmiResult(),"Thinness");
}
@Test
public void BMITest7() throws Exception{
app.setHeight(86.7);
app.setWeight(6349.3);
assertEquals(app.calculateBMI(),37.19,0.5);
assertEquals(app.bmiResult(),"Heavily overweight");
}
@Test
public void BMITest8() throws Exception{
app.setHeight(6.56);
app.setWeight(220.47);
assertEquals(app.calculateBMI(),25,0.5);
assertEquals(app.bmiResult(),"Overweight");
}
@Test
public void BMITest9() throws Exception{
app.setHeight(200);
app.setWeight(80);
assertEquals(app.calculateBMI(),20,0.0);
assertEquals(app.bmiResult(),"Normal");
}
}

View File

@ -0,0 +1,38 @@
package com.epam.bootcamp.bmi_calculator;
import static org.junit.Assert.*;
import org.junit.*;
public class GuessTheUnitsTest {
@Test
public void GuessTheUnitsTest1() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(1.7,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest2() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(170,50.0);
assertEquals(gtu.getUnitType(),"metric");
}
@Test
public void GuessTheUnitsTest3() throws Exception{
GuessTheUnits gtu = new GuessTheUnits(5.58,1764);
assertEquals(gtu.getUnitType(),"US");
assertEquals(gtu.getWeight(),110,1);
}
@Test
public void GuessTheUnitsTest4() throws Exception{
try{
GuessTheUnits gtu = new GuessTheUnits(170,1764);
assertEquals(gtu.getUnitType(),"US");
}catch(Exception e){
assertEquals(e.getMessage(),"Height and weight is in different metric.");
}
}
}