Skip to content
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

TestSubscriber - add factory methods #2982

Merged
merged 1 commit into from
Jun 17, 2015

Conversation

davidmoten
Copy link
Collaborator

Since we use this so much I've added factory methods so we can infer types.

Instead of

TestSubscriber<Integer> ts = new TestSubscriber<Integer>();

We can write

TestSubscriber<Integer> ts = TestSubscriber.create();

I changed the tests in OnSubscribeRangeTest to demo the usage.

@akarnokd
Copy link
Member

Looks handy. @benjchristensen what do you think?

@akarnokd
Copy link
Member

I'm going to merge these as they come in handy while RxJava requires Java 6 to compile.

akarnokd added a commit that referenced this pull request Jun 17, 2015
@akarnokd akarnokd merged commit 0caeea8 into ReactiveX:1.x Jun 17, 2015
@benjchristensen
Copy link
Member

I'm okay with these additions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants