aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgress.java
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-10 20:51:38 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-10 20:51:38 +0100
commit09d297a383b60cfdba6b6388cc54c9c8fa603e75 (patch)
tree38f2d131bcbb352717c6b7e65cb5fd397071239c /src/main/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgress.java
parent7838a06e5521db39aee8b3b87785fcb5e32cd7ad (diff)
downloadesper-testing-09d297a383b60cfdba6b6388cc54c9c8fa603e75.tar.gz
esper-testing-09d297a383b60cfdba6b6388cc54c9c8fa603e75.tar.bz2
esper-testing-09d297a383b60cfdba6b6388cc54c9c8fa603e75.tar.xz
esper-testing-09d297a383b60cfdba6b6388cc54c9c8fa603e75.zip
o Fixing another bug in the unbreakable poller, stored one build too many in some progress objects too.
o Got the logback.xml + system properties combination to finally work.
Diffstat (limited to 'src/main/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgress.java')
-rw-r--r--src/main/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgress.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgress.java b/src/main/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgress.java
index f43ec94..209cc81 100644
--- a/src/main/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgress.java
+++ b/src/main/java/io/trygvis/esper/testing/core/badge/UnbreakableBadgeProgress.java
@@ -4,7 +4,6 @@ import static fj.P.*;
import fj.*;
import fj.data.*;
import static fj.data.Option.*;
-import static java.util.Collections.singletonList;
import io.trygvis.esper.testing.*;
import io.trygvis.esper.testing.core.db.*;
@@ -42,17 +41,16 @@ public class UnbreakableBadgeProgress extends BadgeProgress {
List<UUID> builds = new ArrayList<>(this.builds);
builds.add(build.uuid);
- if (progression() == UnbreakableBadge.LEVEL_3_COUNT) {
+ if (builds.size() == UnbreakableBadge.LEVEL_3_COUNT) {
// You have to start from scratch now.
- builds = singletonList(build.uuid);
- return p(new UnbreakableBadgeProgress(person, builds), some(new UnbreakableBadge(person, 3, builds)));
+ return p(new UnbreakableBadgeProgress(person, Collections.<UUID>emptyList()), some(new UnbreakableBadge(person, 3, builds)));
}
- if (progression() == UnbreakableBadge.LEVEL_2_COUNT) {
+ if (builds.size() == UnbreakableBadge.LEVEL_2_COUNT) {
return p(new UnbreakableBadgeProgress(person, builds), some(new UnbreakableBadge(person, 2, builds)));
}
- if (progression() == UnbreakableBadge.LEVEL_1_COUNT) {
+ if (builds.size() == UnbreakableBadge.LEVEL_1_COUNT) {
return p(new UnbreakableBadgeProgress(person, builds), some(new UnbreakableBadge(person, 1, builds)));
}