Re-introduce the com.gildedrose package for the Java example. Java isn't able to reference classes in the default packge, so if you're refactoring and putting your refactored code in packges, you can't refer back to the original code (i.e. Item) from them. Ensure the TextTest reference is also updated to the new location of the test.

This commit is contained in:
Ian 2013-03-27 17:13:22 +00:00
parent a2edc93325
commit 7158270109
5 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,4 @@
package com.gildedrose;
class GildedRose {
Item[] items;

View File

@ -1,3 +1,4 @@
package com.gildedrose;
import static org.junit.Assert.*;
import org.junit.Test;

View File

@ -1,3 +1,4 @@
package com.gildedrose;
public class Item {
public String name;

View File

@ -1,3 +1,4 @@
package com.gildedrose;
public class TexttestFixture {
public static void main(String[] args) {

View File

@ -4,7 +4,7 @@ full_name:Gilded Rose Refactoring Kata
default_checkout:/Users/emily/training_materials/Refactoring-Katas/GildedRose
# Settings for the Java version
executable:TexttestFixture
executable:com.gildedrose.TexttestFixture
interpreter:java
# note you'll also need to update the file environment.gr with your classpath if you keep your classfiles somewhere unusual