diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-05 22:39:18 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-05 22:39:18 +0100 |
commit | 12606726c11efbbf7213b05284c94e28a1ae4b8e (patch) | |
tree | 415a400218f3bbaac4f13a43461446f64f74028c /src/test | |
parent | abf160e56be50781b0f78f3f938513ab6102809b (diff) | |
download | esper-testing-12606726c11efbbf7213b05284c94e28a1ae4b8e.tar.gz esper-testing-12606726c11efbbf7213b05284c94e28a1ae4b8e.tar.bz2 esper-testing-12606726c11efbbf7213b05284c94e28a1ae4b8e.tar.xz esper-testing-12606726c11efbbf7213b05284c94e28a1ae4b8e.zip |
o Including state in both badge and badge progress.
o Removing count from badge, inserting one badge per badge received.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgressTest.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgressTest.java b/src/test/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgressTest.java index b50693d..3ee0c05 100644 --- a/src/test/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgressTest.java +++ b/src/test/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgressTest.java @@ -2,6 +2,7 @@ package io.trygvis.esper.testing.core.badge; import fj.*; import fj.data.*; +import io.trygvis.esper.testing.*; import io.trygvis.esper.testing.core.db.*; import junit.framework.*; import org.joda.time.*; @@ -9,6 +10,7 @@ import org.joda.time.*; import java.util.*; import java.util.List; +import static io.trygvis.esper.testing.Uuid.randomUuid; import static java.util.UUID.*; public class UnbreakableBadgeProgressTest extends TestCase { @@ -18,7 +20,7 @@ public class UnbreakableBadgeProgressTest extends TestCase { BuildDto success = new BuildDto(uuid, new DateTime(), new DateTime(), true, null); BuildDto failure = new BuildDto(uuid, new DateTime(), new DateTime(), false, null); - UUID person = randomUUID(); + Uuid person = randomUuid(); UnbreakableBadgeProgress p = UnbreakableBadgeProgress.initial(person); @@ -34,7 +36,7 @@ public class UnbreakableBadgeProgressTest extends TestCase { p = p2._1(); } - assertEquals(5, p.count); + assertEquals(5, p.builds.size()); assertEquals(3, badges.size()); assertEquals(1, badges.get(0).level); assertEquals(2, badges.get(1).level); @@ -42,7 +44,7 @@ public class UnbreakableBadgeProgressTest extends TestCase { P2<UnbreakableBadgeProgress, Option<UnbreakableBadge>> p2 = p.onBuild(failure); - assertEquals(0, p2._1().count); + assertEquals(0, p2._1().builds.size()); assertFalse(p2._2().isSome()); } } |