great-expectations
great-expectations copied to clipboard
Eclipse objects to the recommended expect() methods.
Hi.
I find Eclipse doesn't like the suggested Expect.java code with the 0.12 library.
This is Java 1.6, Eclipse 3.6's response to the suggested Long:
public static <T extends Long, M extends LongMatcher<T, M>> LongMatcher<T, ?> expect(T actual) { return wrapped(LongMatcher.class, actual); }
Test.java:
@Test public void trivial() { long ten = 10; expect(ten).toBe(10L); //Eclipse shows an error: Bound mismatch: The generic method expect(T) of type Expect is not applicable for the arguments (Long). The inferred type ObjectMatcher<Long,ObjectMatcher<Long,M>> is not a valid substitute for the bounded parameter <M extends ObjectMatcher<T,M>> }
Eclipse is only happy if have expect()s like this:
public static <T extends Long> ComparableMatcher<T, ?> expect (T actual) { return wrapped(ComparableMatcher.class, actual); }
Boolean works happily from great-expectations 0.12 - already having this sort of expect() - but String fails in a similar way.
Am I using the wrong version of Java? Is this something else Eclipse is deficient in? I didn't see a set of minimum versions specified in the readme file.
I'm using Ubuntu Oneric, in case it's relevant.
Thanks.