format Java code (only whitespace changes)

This commit is contained in:
Peter Kofler committed 2014-01-25 23:01:39 +01:00
1 parent 75a2a15f14
commit 7c817b1032
4 files changed
+26 -21

No files matched your search

+1
View File
@@ -1,4 +1,5 @@
package com.gildedrose;
class GildedRose {
Item[] items;
+9 -7
View File
@@ -1,15 +1,17 @@
package com.gildedrose;
import static org.junit.Assert.*;
import org.junit.Test;
public class GildedRoseTest {
@Test
public void foo() {
Item[] items = new Item[] { new Item("foo", 0, 0) };
GildedRose app = new GildedRose(items);
app.updateQuality();
assertEquals("fixme", app.items[0].name);
}
@Test
public void foo() {
Item[] items = new Item[] { new Item("foo", 0, 0) };
GildedRose app = new GildedRose(items);
app.updateQuality();
assertEquals("fixme", app.items[0].name);
}
}
Executable → Regular
+1
View File
@@ -1,4 +1,5 @@
package com.gildedrose;
public class Item {
public String name;
+15 -14
View File
@@ -2,20 +2,21 @@ package com.gildedrose;
public class TexttestFixture {
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),
new Item("Aged Brie", 2, 0),
new Item("Elixir of the Mongoose", 5, 7),
new Item("Sulfuras, Hand of Ragnaros", 0, 80),
new Item("Sulfuras, Hand of Ragnaros", -1, 80),
new Item("Backstage passes to a TAFKAL80ETC concert", 15, 20),
new Item("Backstage passes to a TAFKAL80ETC concert", 10, 49),
new Item("Backstage passes to a TAFKAL80ETC concert", 5, 49),
// this conjured item does not work properly yet
new Item("Conjured Mana Cake", 3, 6) };
Item[] items = new Item[] {
new Item("+5 Dexterity Vest", 10, 20), //
new Item("Aged Brie", 2, 0), //
new Item("Elixir of the Mongoose", 5, 7), //
new Item("Sulfuras, Hand of Ragnaros", 0, 80), //
new Item("Sulfuras, Hand of Ragnaros", -1, 80),
new Item("Backstage passes to a TAFKAL80ETC concert", 15, 20),
new Item("Backstage passes to a TAFKAL80ETC concert", 10, 49),
new Item("Backstage passes to a TAFKAL80ETC concert", 5, 49),
// 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;
if (args.length > 0) {
@@ -29,8 +30,8 @@ public class TexttestFixture {
System.out.println(item);
}
System.out.println();
app.updateQuality();
app.updateQuality();
}
}
}
}