@Test public void testThatVerificationFailsIfTheProductEndsAfterTimeRange() { final long timeRangeEndTime = _timeRangeEnd.getAsDate().getTime(); final Date afterTime = new Date(timeRangeEndTime + 1000); PowerMockito.when(M_product.getEndTime()).thenReturn(ProductData.UTC.create(afterTime, 0)); boolean result = _productValidator.isValid(M_product); assertEquals(false, result); verify(S_logger, times(1)).info("Product skipped. The product 'ProductMock' is not inside the date range from 21-MAY-2012 00:00:00.000000 to 08-JUL-2012 00:00:00.000000"); }
public boolean isValid(Product product) { return product != null && containsGeoCodingWithReverseOperationSupport(product) && fulfillsTimeConditions(product) && canHandleExpressionOrSourceBand(product) && isInDateRange(product) && intersectsTargetArea(product); }
ProductValidator { public boolean isValid(Product product) { return product != null && containsGeoCodingWithReverseOperationSupport(product) && fulfillsTimeConditions(product) && canHandleExpressionOrSourceBand(product) && isInDateRange(product) && intersectsTargetArea(product); } }
ProductValidator { public boolean isValid(Product product) { return product != null && containsGeoCodingWithReverseOperationSupport(product) && fulfillsTimeConditions(product) && canHandleExpressionOrSourceBand(product) && isInDateRange(product) && intersectsTargetArea(product); } ProductValidator(String sourceBandName, String bandMathExpression, String validPixelExpression, ProductData.UTC startDate, ProductData.UTC endDate, Area targetArea, Logger logger); }
ProductValidator { public boolean isValid(Product product) { return product != null && containsGeoCodingWithReverseOperationSupport(product) && fulfillsTimeConditions(product) && canHandleExpressionOrSourceBand(product) && isInDateRange(product) && intersectsTargetArea(product); } ProductValidator(String sourceBandName, String bandMathExpression, String validPixelExpression, ProductData.UTC startDate, ProductData.UTC endDate, Area targetArea, Logger logger); boolean isValid(Product product); }
ProductValidator { public boolean isValid(Product product) { return product != null && containsGeoCodingWithReverseOperationSupport(product) && fulfillsTimeConditions(product) && canHandleExpressionOrSourceBand(product) && isInDateRange(product) && intersectsTargetArea(product); } ProductValidator(String sourceBandName, String bandMathExpression, String validPixelExpression, ProductData.UTC startDate, ProductData.UTC endDate, Area targetArea, Logger logger); boolean isValid(Product product);  }