AfterOperator { public boolean evaluate( final TimeGeometricPrimitive self, final TimeGeometricPrimitive other ) { if ( self == null || other == null ) return false; int compareBeginWithEnd = compareBeginWithEnd( self, other ); return compareBeginWithEnd > 0; }  boolean evaluate( final TimeGeometricPrimitive self, final TimeGeometricPrimitive other );  }
@Test public void evaluateInstantInstant() { assertFalse( after.evaluate( instant( "2014-01-01" ), instant( "2014-01-01" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:01" ), instant( "2014-01-01T00:00:01" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:01.000" ), instant( "2014-01-01T00:00:01.000" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01" ), instant( "2015-01-01" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:01" ), instant( "2014-01-01T00:00:02" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:01.000" ), instant( "2014-01-01T00:00:01.001" ) ) ); assertFalse( after.evaluate( null, null ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:01" ), instant( "2014-01-01T00:00:01" ) ) ); assertFalse( after.evaluate( instant( "INDETERMINATE" ), instant( "INDETERMINATE" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:01" ), instant( "2014-01-01T00:00:02" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:01" ), instant( "INDETERMINATE" ) ) ); assertFalse( after.evaluate( instant( "INDETERMINATE" ), instant( "2014-01-01T00:00:01" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:01" ), null ) ); assertFalse( after.evaluate( null, instant( "2014-01-01T00:00:01" ) ) ); assertTrue( after.evaluate( instant( "2015-01-01" ), instant( "2014-01-01" ) ) ); assertTrue( after.evaluate( instant( "2014-01-01T00:00:02" ), instant( "2014-01-01T00:00:01" ) ) ); assertTrue( after.evaluate( instant( "2014-01-01T00:00:01.001" ), instant( "2014-01-01T00:00:01.000" ) ) ); }
@Test public void evaluateInstantPeriod() { assertFalse( after.evaluate( instant( "2014-01-01T00:00:01" ), period( "2014-01-01T00:00:01", "2014-01-01T00:00:01" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:00" ), period( "2014-01-01T00:00:01", "2014-01-01T00:00:03" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:01" ), period( "2014-01-01T00:00:01", "2014-01-01T00:00:03" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:02" ), period( "2014-01-01T00:00:01", "2014-01-01T00:00:03" ) ) ); assertFalse( after.evaluate( instant( "2014-01-01T00:00:03" ), period( "2014-01-01T00:00:01", "2014-01-01T00:00:03" ) ) ); assertTrue( after.evaluate( instant( "2014-01-01T00:00:04" ), period( "2014-01-01T00:00:01", "2014-01-01T00:00:03" ) ) ); }
@Test public void evaluatePeriodInstant() { assertFalse( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:01" ), instant( "2014-01-01T00:00:01" ) ) ); assertFalse( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:03" ), instant( "2014-01-01T00:00:01" ) ) ); assertFalse( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:03" ), instant( "2014-01-01T00:00:02" ) ) ); assertFalse( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:03" ), instant( "2014-01-01T00:00:03" ) ) ); assertFalse( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:03" ), instant( "2014-01-01T00:00:04" ) ) ); assertTrue( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:03" ), instant( "2014-01-01T00:00:00" ) ) ); }
@Test public void evaluatePeriodPeriod() { assertFalse( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:01" ), period( "2014-01-01T00:00:01", "2014-01-01T00:00:01" ) ) ); assertFalse( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:02" ), period( "2014-01-01T00:00:01", "2014-01-01T00:00:02" ) ) ); assertFalse( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:02" ), period( "2014-01-01T00:00:00", "2014-01-01T00:00:01" ) ) ); assertFalse( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:02" ), period( "2014-01-01T00:00:01", "2014-01-01T00:00:04" ) ) ); assertFalse( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:02" ), period( "2014-01-01T00:00:02", "2014-01-01T00:00:04" ) ) ); assertFalse( after.evaluate( period( "2014-01-01T00:00:01", "2014-01-01T00:00:02" ), period( "2014-01-01T00:00:03", "2014-01-01T00:00:04" ) ) ); assertTrue( after.evaluate( period( "2014-01-01T00:00:03", "2014-01-01T00:00:04" ), period( "2014-01-01T00:00:01", "2014-01-01T00:00:02" ) ) ); }