mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-17 19:35:06 +00:00
format Java code (only whitespace changes)
This commit is contained in:
1 parent
75a2a15f14
commit
7c817b1032
4 files changed
+26
-21
No files matched your search
Executable → Regular
+1
@@ -1,4 +1,5 @@
|
|||||||
package com.gildedrose;
|
package com.gildedrose;
|
||||||
|
|
||||||
class GildedRose {
|
class GildedRose {
|
||||||
Item[] items;
|
Item[] items;
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
package com.gildedrose;
|
package com.gildedrose;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class GildedRoseTest {
|
public class GildedRoseTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void foo() {
|
public void foo() {
|
||||||
Item[] items = new Item[] { new Item("foo", 0, 0) };
|
Item[] items = new Item[] { new Item("foo", 0, 0) };
|
||||||
GildedRose app = new GildedRose(items);
|
GildedRose app = new GildedRose(items);
|
||||||
app.updateQuality();
|
app.updateQuality();
|
||||||
assertEquals("fixme", app.items[0].name);
|
assertEquals("fixme", app.items[0].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Executable → Regular
+1
@@ -1,4 +1,5 @@
|
|||||||
package com.gildedrose;
|
package com.gildedrose;
|
||||||
|
|
||||||
public class Item {
|
public class Item {
|
||||||
|
|
||||||
public String name;
|
public String name;
|
||||||
|
|||||||
Executable → Regular
+15
-14
@@ -2,20 +2,21 @@ package com.gildedrose;
|
|||||||
|
|
||||||
public class TexttestFixture {
|
public class TexttestFixture {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("OMGHAI!");
|
System.out.println("OMGHAI!");
|
||||||
|
|
||||||
Item[] items = new Item[] { new Item("+5 Dexterity Vest", 10, 20),
|
Item[] items = new Item[] {
|
||||||
new Item("Aged Brie", 2, 0),
|
new Item("+5 Dexterity Vest", 10, 20), //
|
||||||
new Item("Elixir of the Mongoose", 5, 7),
|
new Item("Aged Brie", 2, 0), //
|
||||||
new Item("Sulfuras, Hand of Ragnaros", 0, 80),
|
new Item("Elixir of the Mongoose", 5, 7), //
|
||||||
new Item("Sulfuras, Hand of Ragnaros", -1, 80),
|
new Item("Sulfuras, Hand of Ragnaros", 0, 80), //
|
||||||
new Item("Backstage passes to a TAFKAL80ETC concert", 15, 20),
|
new Item("Sulfuras, Hand of Ragnaros", -1, 80),
|
||||||
new Item("Backstage passes to a TAFKAL80ETC concert", 10, 49),
|
new Item("Backstage passes to a TAFKAL80ETC concert", 15, 20),
|
||||||
new Item("Backstage passes to a TAFKAL80ETC concert", 5, 49),
|
new Item("Backstage passes to a TAFKAL80ETC concert", 10, 49),
|
||||||
// this conjured item does not work properly yet
|
new Item("Backstage passes to a TAFKAL80ETC concert", 5, 49),
|
||||||
new Item("Conjured Mana Cake", 3, 6) };
|
// this conjured item does not work properly yet
|
||||||
|
new Item("Conjured Mana Cake", 3, 6) };
|
||||||
|
|
||||||
GildedRose app = new GildedRose(items);
|
GildedRose app = new GildedRose(items);
|
||||||
|
|
||||||
int days = 2;
|
int days = 2;
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
@@ -29,8 +30,8 @@ public class TexttestFixture {
|
|||||||
System.out.println(item);
|
System.out.println(item);
|
||||||
}
|
}
|
||||||
System.out.println();
|
System.out.println();
|
||||||
app.updateQuality();
|
app.updateQuality();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user