@Test public void testInvalidInitSeasonalEstimateAdditive() { expectedEx.expect(IllegalArgumentException.class); expectedEx.expectMessage("Invalid: Sum of initSeasonalEstimates (-1,100) was outside accepted tolerance. Sum should be 0 with a tolerance within 1% of largest seasonal estimate distance from 0 (±1,011), for ADDITIVE seasonality type."); subject.validate(INVALID_ADDITIVE_SEASONAL_COMPONENT, DUMMY_FREQUENCY, HoltWintersSeasonalityType.ADDITIVE); }
public void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType) { checkNotNull(initSeasonalEstimates); if (initSeasonalEstimates.length <= 0) return; checkLength(initSeasonalEstimates, frequency); checkSumOfEstimates(initSeasonalEstimates, frequency, seasonalityType); }
HoltWintersSeasonalEstimatesValidator { public void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType) { checkNotNull(initSeasonalEstimates); if (initSeasonalEstimates.length <= 0) return; checkLength(initSeasonalEstimates, frequency); checkSumOfEstimates(initSeasonalEstimates, frequency, seasonalityType); } }
HoltWintersSeasonalEstimatesValidator { public void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType) { checkNotNull(initSeasonalEstimates); if (initSeasonalEstimates.length <= 0) return; checkLength(initSeasonalEstimates, frequency); checkSumOfEstimates(initSeasonalEstimates, frequency, seasonalityType); }  }
HoltWintersSeasonalEstimatesValidator { public void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType) { checkNotNull(initSeasonalEstimates); if (initSeasonalEstimates.length <= 0) return; checkLength(initSeasonalEstimates, frequency); checkSumOfEstimates(initSeasonalEstimates, frequency, seasonalityType); }  void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType); }
HoltWintersSeasonalEstimatesValidator { public void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType) { checkNotNull(initSeasonalEstimates); if (initSeasonalEstimates.length <= 0) return; checkLength(initSeasonalEstimates, frequency); checkSumOfEstimates(initSeasonalEstimates, frequency, seasonalityType); }  void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType);  }