aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/io
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-12-28 20:02:07 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2012-12-28 20:02:07 +0100
commitf39b6c813dfa8ad97de4f8a35aaf21ee1408b6d4 (patch)
treee10e366d815f6115dca53742c92342c36f8178fb /src/test/java/io
parent9e8f4821c1e708ccd868866314111b6f8cc9bc6f (diff)
downloadesper-testing-f39b6c813dfa8ad97de4f8a35aaf21ee1408b6d4.tar.gz
esper-testing-f39b6c813dfa8ad97de4f8a35aaf21ee1408b6d4.tar.bz2
esper-testing-f39b6c813dfa8ad97de4f8a35aaf21ee1408b6d4.tar.xz
esper-testing-f39b6c813dfa8ad97de4f8a35aaf21ee1408b6d4.zip
o A custom pageable table with builds.
Diffstat (limited to 'src/test/java/io')
-rw-r--r--src/test/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgressTest.java10
1 files changed, 8 insertions, 2 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 42ca98d..b50693d 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
@@ -15,7 +15,8 @@ public class UnbreakableBadgeProgressTest extends TestCase {
UUID uuid = randomUUID();
public void testBadge() {
- BuildDto build = new BuildDto(uuid, new DateTime(), new DateTime(), true, null);
+ 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();
@@ -24,7 +25,7 @@ public class UnbreakableBadgeProgressTest extends TestCase {
List<UnbreakableBadge> badges = new ArrayList<>();
for (int i = 0; i < 55; i++) {
- P2<UnbreakableBadgeProgress, Option<UnbreakableBadge>> p2 = p.onBuild(build);
+ P2<UnbreakableBadgeProgress, Option<UnbreakableBadge>> p2 = p.onBuild(success);
if (p2._2().isSome()) {
badges.add(p2._2().some());
@@ -38,5 +39,10 @@ public class UnbreakableBadgeProgressTest extends TestCase {
assertEquals(1, badges.get(0).level);
assertEquals(2, badges.get(1).level);
assertEquals(3, badges.get(2).level);
+
+ P2<UnbreakableBadgeProgress, Option<UnbreakableBadge>> p2 = p.onBuild(failure);
+
+ assertEquals(0, p2._1().count);
+ assertFalse(p2._2().isSome());
}
}