New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parametrized runner for tests with one parameter #700
Comments
We tried this a while back. I think the problem is that because Object[] is itself a subtype of Object, the corner cases got messy. What about a static helper method that does the one-to-two-dimension conversion for you? |
…m#700. Support the return types Iterator<? extends Object>, Object[] and Object[][]. You don't have to wrap arrays with Iterables and single parameters with Object arrays.
@dsaff It looks like the proposed extension is feasible. But it's late at night and maybe I overlooked something. Eclipse has applied a different format to the files.Therefore I first will fix the format and then create a pull request. But not today :-) |
@artkoshelev Do you have an example of a test with a single parameter. I could not create something reasonable. |
thanks! the return types Iterator<? extends Object>, Object[] from your commit looks exactly like what i was asking for =) |
Thank you for providing a use case for single-parameter tests. |
…m#700. Support the return types Iterator<? extends Object>, Object[] and Object[][]. You don't have to wrap arrays with Iterables and single parameters with Object arrays.
…m#700. Support the return types Iterator<? extends Object>, Object[] and Object[][]. You don't have to wrap arrays with Iterables and single parameters with Object arrays.
…m#700. Support the return types Iterator<? extends Object>, Object[] and Object[][]. You don't have to wrap arrays with Iterables and single parameters with Object arrays.
…m#700. Support the return types Iterator<? extends Object>, Object[] and Object[][]. You don't have to wrap arrays with Iterables and single parameters with Object arrays.
…m#700. Support the return types Iterator<? extends Object>, Object[] and Object[][]. You don't have to wrap arrays with Iterables and single parameters with Object arrays.
…m#700. Support the return types Iterator<? extends Object>, Object[] and Object[][]. You don't have to wrap arrays with Iterables and single parameters with Object arrays.
…m#700. Support the return types Iterator<? extends Object>, Object[] and Object[][]. You don't have to wrap arrays with Iterables and single parameters with Object arrays.
…m#700. Support the return types Iterator<? extends Object>, Object[] and Object[][]. You don't have to wrap arrays with Iterables and single parameters with Object arrays.
…m#700. Support the return types Iterator<? extends Object>, Object[] and Object[][]. You don't have to wrap arrays with Iterables and single parameters with Object arrays.
Support more return types for the @parameters method. Fixes #700.
Usually i write parametrized tests with only one input parameter. So, using the Collection <Object[]> return type for my data() method and conversion from one-dimensional collection to two-dimensional looks like overkill.
It would be nice to be able annotate with @parameters method, which returns Collection.
What do you think about this idea? If it's ok, i'll implement it.
The text was updated successfully, but these errors were encountered: