From: SourceForge.net <no...@so...> - 2009-12-01 02:20:21
|
Feature Requests item #2149557, was opened at 2008-10-06 13:59 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365278&aid=2149557&group_id=15278 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Dominic Mitchell (dom2) Assigned to: Nobody/Anonymous (nobody) Summary: assertThat generics enhancement Initial Comment: It would be really nice if assertThat() allowed a subclass to match. i.e. public static <T> void assertThat(T actual, Matcher<? extends T> matcher) { } Why does this matter? At the moment, I'm testing things that are coming out of a ServletContext. And ServletContext.getAttribute() returns an Object. And I'd like to be able to say: assertThat(context.getAttribute("foo"), is("bar")); But eclipse complains with "The method assertThat(T, Matcher<T>) in the type Assert is no applicable for the arguments (Object, Matcher<String>). ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2009-12-01 02:20 Message: This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: David Saff (dsaff) Date: 2009-11-16 17:52 Message: This tracker is being shut down. Please move this item to http://github.com/KentBeck/junit/issues ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365278&aid=2149557&group_id=15278 |