Skip to content

Instantly share code, notes, and snippets.

@mike-rogers
mike-rogers / GildedRose.scala
Created November 10, 2015 19:55
Gilded Rose Kata in Scala
package com.gildedrose
case class AgedBrie(var sellWithin: Int, var value: Int)
extends Item("Aged Brie", sellWithin, value)
case class BackstagePass(var sellWithin: Int, var value: Int)
extends Item("Backstage passes to a TAFKAL80ETC concert", sellWithin, value)
case class Sulfuras(var sellWithin: Int, var value: Int)
extends Item("Sulfuras, Hand of Ragnaros", sellWithin, value)
@mike-rogers
mike-rogers / FeatureTest.java
Created May 3, 2015 14:27
TDD in Java using JUnit Theories
@DataPoints
public static String[] usernames() {
return new String[] {
"user1", "user2", "user3", "user4", "user5", "", null
};
}
@Theory
public void shouldDenyAccessToUsersWhenExceptionsAreUnspecified(String username) {
FeatureFilter featureFilter = FeatureFilter
class Programmer {
private String name;
public Programmer(String name) {
this.name = name;
}
public String getName() {
return this.name;
}

Keybase proof

I hereby claim:

  • I am mike-rogers on github.
  • I am mikerogers_ (https://keybase.io/mikerogers_) on keybase.
  • I have a public key whose fingerprint is 3A60 8E72 5005 3842 6DF4 8AF2 5353 685C 89ED 1DD0

To claim this, I am signing this object:

### GIT SYMBOLS
# s (yellow) -- stashed objects
# u (red) -- untracked files
# u (yellow) -- uncommitted changes
# x (red) -- HEAD isn't a valid object
# s (green) -- changes staged
### COLORS
# Reset