@Test public void rollupNotFreshEnoughNotTerminated() throws Exception { final DateMidnight latestRollupDate = new DateMidnight(2013, 10, 7); final DateMidnight today = new DateMidnight(2013, 10, 12); final Date endDate = df.parse("2013-10-12T01:00:00+0000"); final Date modifiedDate = df.parse("2013-10-07T23:00:00+0000"); final State state = State.RUNNING; final int maxAgeAllowedInDays = 2; Rollup rollup = rollupWith(latestRollupDate, today, maxAgeAllowedInDays, endDate, modifiedDate, state); assertThat(rollup.isFreshEnough(), is(false)); }
public boolean isFreshEnough() { if (latestAvailableRollupDate == null) { return false; } DateMidnight earliestValidDate = comparisonDate().minusDays(getMaxAllowedRollupAgeDays()); return !latestAvailableRollupDate.isBefore(earliestValidDate); }
Rollup { public boolean isFreshEnough() { if (latestAvailableRollupDate == null) { return false; } DateMidnight earliestValidDate = comparisonDate().minusDays(getMaxAllowedRollupAgeDays()); return !latestAvailableRollupDate.isBefore(earliestValidDate); } }
Rollup { public boolean isFreshEnough() { if (latestAvailableRollupDate == null) { return false; } DateMidnight earliestValidDate = comparisonDate().minusDays(getMaxAllowedRollupAgeDays()); return !latestAvailableRollupDate.isBefore(earliestValidDate); } Rollup(Experiment exp, Transaction transaction);  Rollup(Experiment exp, boolean cumulative, Transaction transaction); }
Rollup { public boolean isFreshEnough() { if (latestAvailableRollupDate == null) { return false; } DateMidnight earliestValidDate = comparisonDate().minusDays(getMaxAllowedRollupAgeDays()); return !latestAvailableRollupDate.isBefore(earliestValidDate); } Rollup(Experiment exp, Transaction transaction);  Rollup(Experiment exp, boolean cumulative, Transaction transaction); boolean isFreshEnough(); String latestAvailableRollupDateAsString(); }
Rollup { public boolean isFreshEnough() { if (latestAvailableRollupDate == null) { return false; } DateMidnight earliestValidDate = comparisonDate().minusDays(getMaxAllowedRollupAgeDays()); return !latestAvailableRollupDate.isBefore(earliestValidDate); } Rollup(Experiment exp, Transaction transaction);  Rollup(Experiment exp, boolean cumulative, Transaction transaction); boolean isFreshEnough(); String latestAvailableRollupDateAsString();  }