diff --git a/scala/project/build.properties b/scala/project/build.properties index 27e88aa1..d6e35076 100644 --- a/scala/project/build.properties +++ b/scala/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.13 +sbt.version=1.1.6 diff --git a/scala/src/test/scala/com/gildedrose/TexttestFixture.scala b/scala/src/test/scala/com/gildedrose/TexttestFixture.scala new file mode 100644 index 00000000..340bafad --- /dev/null +++ b/scala/src/test/scala/com/gildedrose/TexttestFixture.scala @@ -0,0 +1,29 @@ +package com.gildedrose + +object TexttestFixture { + def main(args: Array[String]): Unit = { + var items = Array[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) + ) + val app = new GildedRose(items) + val days = if (args.length > 0) args(0).toInt + 1 else 2 + for (i <- 0 until days) { + System.out.println("-------- day " + i + " --------") + System.out.println("name, sellIn, quality") + for (item <- items) { + System.out.println(item.name + ", " + item.sellIn + ", " + item.quality) + } + System.out.println() + app.updateQuality() + } + } +}