File tree Expand file tree Collapse file tree 8 files changed +12
-14
lines changed
src/main/scala/rx/lang/scala/schedulers Expand file tree Collapse file tree 8 files changed +12
-14
lines changed Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- package rx . lang . scala . examples ;
16+ package examples ;
1717
1818import rx .Observable ;
1919import rx .functions .Action1 ;
20- import rx .lang .scala .examples .Movie ;
21- import rx .lang .scala .examples .MovieLib ;
2220import static rx .lang .scala .JavaConversions .toScalaObservable ;
2321
2422public class MovieLibUsage {
Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- package rx . lang . scala . examples
16+ package examples
1717
1818import scala .collection .mutable
1919
Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- package rx . lang . scala . examples
16+ package examples
1717
1818import scala .concurrent .duration ._
1919import scala .language .postfixOps
Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- package rx . lang . scala . examples
16+ package examples
1717
1818import rx .lang .scala .Observable
1919
Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- package rx . lang . scala . examples
16+ package examples
1717
1818import rx .lang .scala .Observable
1919import scala .concurrent .duration ._
Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- package rx . lang . scala . examples
16+ package examples
1717
1818import java .io .IOException
1919import java .util .concurrent .CountDownLatch
@@ -708,8 +708,8 @@ class RxScalaDemo extends JUnitSuite {
708708 import Notification ._
709709 val oc1 : Notification [Nothing ] = OnCompleted
710710 val oc2 : Notification [Int ] = OnCompleted
711- val oc3 : rx.Notification [_ <: Int ] = oc2.asJavaNotification
712- val oc4 : rx.Notification [_ <: Any ] = oc2.asJavaNotification
711+ val oc3 : rx.Notification [_ <: Int ] = JavaConversions .toJavaNotification(oc2)
712+ val oc4 : rx.Notification [_ <: Any ] = JavaConversions .toJavaNotification(oc2)
713713 }
714714
715715 @ Test def takeWhileWithIndexAlternative {
Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- package rx .lang .scala .examples
17-
1816import scala .concurrent .duration .DurationInt
1917import scala .language .postfixOps
2018import org .junit .Test
@@ -24,6 +22,7 @@ import org.scalatest.junit.JUnitSuite
2422import rx .lang .scala ._
2523import rx .lang .scala .schedulers .TestScheduler
2624import rx .observers .TestObserver
25+ import rx .lang .scala .JavaConversions ._
2726
2827class TestSchedulerExample extends JUnitSuite {
2928
@@ -35,7 +34,7 @@ class TestSchedulerExample extends JUnitSuite {
3534 val o = Observable .interval(1 second, scheduler)
3635
3736 // Wrap Java Observer in Scala Observer, then subscribe
38- val sub = o.subscribe(Observer (new TestObserver (observer)))
37+ val sub = o.subscribe(toScalaObserver (new TestObserver (observer)))
3938
4039 verify(observer, never).onNext(0L )
4140 verify(observer, never).onCompleted()
Original file line number Diff line number Diff line change @@ -37,12 +37,13 @@ object TestScheduler {
3737 * @Test def testInterval() {
3838 * import org.mockito.Matchers._
3939 * import org.mockito.Mockito._
40+ * import rx.lang.scala.JavaConversions._
4041 *
4142 * val scheduler = TestScheduler()
4243 * val observer = mock(classOf[rx.Observer[Long]])
4344 *
4445 * val o = Observable.interval(1 second, scheduler)
45- * val sub = o.subscribe(observer)
46+ * val sub = o.subscribe(toScalaObserver(new TestObserver( observer)) )
4647 *
4748 * verify(observer, never).onNext(0L)
4849 * verify(observer, never).onCompleted()
You can’t perform that action at this time.
0 commit comments