Skip to content

Commit

Permalink
Merge remote-tracking branch 'mairbek/single'
Browse files Browse the repository at this point in the history
Added @throws javadocs
Suppressed rawtypes warnings

Conflicts:
	language-adaptors/rxjava-groovy/src/test/groovy/rx/lang/groovy/ObservableTests.groovy
	rxjava-core/src/main/java/rx/Observable.java
  • Loading branch information
benjchristensen committed Feb 28, 2013
2 parents b1d8817 + cfa03c2 commit 9dca835
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/groovy/rx/lang/groovy/ObservableTests.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,16 @@ def class ObservableTests {
def val = Observable.toObservable("one", "two").lastOrDefault("default", { x -> x.length() > 3})
assertEquals("default", val)
}

public void testSingle1() {
def s = Observable.toObservable("one").single({ x -> x.length() == 3})
assertEquals("one", s)
}

@Test(expected = IllegalStateException.class)
public void testSingle2() {
Observable.toObservable("one", "two").single({ x -> x.length() == 3})
}

def class AsyncObservable implements Func1<Observer<Integer>, Subscription> {

Expand Down

0 comments on commit 9dca835

Please sign in to comment.