Added dependancies to run code coverage checks

This commit is contained in:
Matt Decker 2022-07-04 14:45:03 -05:00
parent 72f0a797bc
commit 61ff36cad8
8 changed files with 112 additions and 4 deletions

19
.classpath Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="Java-Approvals/.mvn/wrapper"/>
<classpathentry kind="src" path="Java-Approvals/src/main/java"/>
<classpathentry kind="src" path="Java-Approvals/src/test/java"/>
<classpathentry kind="src" path="Java-Cucumber/.mvn/wrapper"/>
<classpathentry kind="src" path="Java-Cucumber/src/main/java"/>
<classpathentry kind="src" path="Java-Cucumber/src/test/java"/>
<classpathentry kind="src" path="Java-Spock/src/main/java"/>
<classpathentry kind="src" path="Java/.mvn/wrapper"/>
<classpathentry kind="src" path="Java/src/main/java"/>
<classpathentry kind="src" path="Java/src/test/java"/>
<classpathentry kind="lib" path="Java-Approvals/gradle/wrapper/gradle-wrapper.jar"/>
<classpathentry kind="lib" path="Java-Cucumber/gradle/wrapper/gradle-wrapper.jar"/>
<classpathentry kind="lib" path="Java-Spock/gradle/wrapper/gradle-wrapper.jar"/>
<classpathentry kind="lib" path="Java/gradle/wrapper/gradle-wrapper.jar"/>
<classpathentry kind="output" path="Java/target/classes"/>
</classpath>

17
.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Group2-GildedRose-Refactoring-Kata</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

33
Java-Cucumber/.classpath Normal file
View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

23
Java-Cucumber/.project Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Java-Cucumber</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

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

View File

@ -0,0 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8

3
Java/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}

View File

@ -6,7 +6,7 @@ class GildedRose {
public static final String SULFURAS = "Sulfuras, Hand of Ragnaros"; public static final String SULFURAS = "Sulfuras, Hand of Ragnaros";
public static final String BACKSTAGE = "Backstage passes to a TAFKAL80ETC concert"; public static final String BACKSTAGE = "Backstage passes to a TAFKAL80ETC concert";
public static final String CONJURED = "Conjured Mana Cake"; public static final String CONJURED = "Conjured Mana Cake";
private Item[] items;
private Item[] items; private Item[] items;
@ -14,7 +14,7 @@ class GildedRose {
this.items = items; this.items = items;
} }
public void updateQuality() { public void updateQuality() {
for (Item item : items) { for (Item item : items) {
updateItemQuality(item); updateItemQuality(item);
} }
@ -33,7 +33,7 @@ class GildedRose {
if (item.name.equals(AGED_BRIE)) { if (item.name.equals(AGED_BRIE)) {
int adjustment = isExpired ? 2 : 1; int adjustment = isExpired ? 2 : 1;
adjustQuality(item, adjustment); adjustQuality(item, adjustment);
} }
if (item.name.equals(BACKSTAGE)) { if (item.name.equals(BACKSTAGE)) {
updateBackStagePass(item, isExpired); updateBackStagePass(item, isExpired);
@ -55,7 +55,7 @@ class GildedRose {
} }
if (isExpired) { if (isExpired) {
item.quality = item.quality - item.quality; item.quality = item.quality - item.quality;
} }
} }
private int determineDegradeRate(Item item, boolean isExpired) { private int determineDegradeRate(Item item, boolean isExpired) {