Skip to content

Commit 0f19120

Browse files
committed
Update more mappings to CompletenessTest
1 parent 423395b commit 0f19120

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

language-adaptors/rxjava-scala/src/test/scala/rx/lang/scala/CompletenessTest.scala

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class CompletenessTest extends JUnitSuite {
7979
"firstOrDefault(T)" -> "firstOrElse(=> U)",
8080
"firstOrDefault(T, Func1[_ >: T, Boolean])" -> "[use `.filter(condition).firstOrElse(default)`]",
8181
"groupBy(Func1[_ >: T, _ <: K], Func1[_ >: T, _ <: R])" -> "[use `groupBy` and `map`]",
82+
"groupByUntil(Func1[_ >: T, _ <: TKey], Func1[_ >: GroupedObservable[TKey, T], _ <: Observable[_ <: TDuration]])" -> "groupByUntil(T => K, (K, Observable[T]) => Observable[Any])",
8283
"lift(Operator[_ <: R, _ >: T])" -> "lift(Subscriber[R] => Subscriber[T])",
8384
"mapWithIndex(Func2[_ >: T, Integer, _ <: R])" -> "[combine `zipWithIndex` with `map` or with a for comprehension]",
8485
"onErrorResumeNext(Func1[Throwable, _ <: Observable[_ <: T]])" -> "onErrorResumeNext(Throwable => Observable[U])",
@@ -133,22 +134,24 @@ class CompletenessTest extends JUnitSuite {
133134
"averageDoubles(Observable[Double])" -> averageProblem,
134135
"averageFloats(Observable[Float])" -> averageProblem,
135136
"averageLongs(Observable[Long])" -> averageProblem,
136-
"create(OnSubscribeFunc[T])" -> "apply(Observer[T] => Subscription)",
137+
"create(OnSubscribeFunc[T])" -> "create(Observer[T] => Subscription)",
138+
"create(OnSubscribe[T])" -> "apply(Subscriber[T] => Unit)",
137139
"combineLatest(Observable[_ <: T1], Observable[_ <: T2], Func2[_ >: T1, _ >: T2, _ <: R])" -> "combineLatest(Observable[U])",
138140
"concat(Observable[_ <: Observable[_ <: T]])" -> "concat(<:<[Observable[T], Observable[Observable[U]]])",
139141
"defer(Func0[_ <: Observable[_ <: T]])" -> "defer(=> Observable[T])",
140-
"from(Array[T])" -> "[use apply(T*)]",
142+
"from(Array[T])" -> "[use `items(T*)`]",
141143
"from(Iterable[_ <: T])" -> "from(Iterable[T])",
142144
"from(Future[_ <: T])" -> fromFuture,
143145
"from(Future[_ <: T], Long, TimeUnit)" -> fromFuture,
144146
"from(Future[_ <: T], Scheduler)" -> fromFuture,
145-
"just(T)" -> "[use apply(T*)]",
146-
"just(T, Scheduler)" -> "[use apply(T*).subscribeOn(scheduler)]",
147+
"just(T)" -> "[use `items(T*)`]",
148+
"just(T, Scheduler)" -> "[use `items(T*).subscribeOn(scheduler)`]",
147149
"merge(Observable[_ <: T], Observable[_ <: T])" -> "merge(Observable[U])",
148150
"merge(Observable[_ <: Observable[_ <: T]])" -> "flatten(<:<[Observable[T], Observable[Observable[U]]])",
149151
"mergeDelayError(Observable[_ <: T], Observable[_ <: T])" -> "mergeDelayError(Observable[U])",
150152
"mergeDelayError(Observable[_ <: Observable[_ <: T]])" -> "flattenDelayError(<:<[Observable[T], Observable[Observable[U]]])",
151-
"range(Int, Int)" -> "apply(Range)",
153+
"range(Int, Int)" -> "[use `(... until ...).toObservable`]",
154+
"range(Int, Int, Scheduler)" -> "[use `from((... until ...), scheduler)`]",
152155
"sum(Observable[Integer])" -> "sum(Numeric[U])",
153156
"sumDoubles(Observable[Double])" -> "sum(Numeric[U])",
154157
"sumFloats(Observable[Float])" -> "sum(Numeric[U])",
@@ -166,7 +169,7 @@ class CompletenessTest extends JUnitSuite {
166169
"concat(" + _ + ")" -> "[unnecessary because we can use `++` instead or `Observable(o1, o2, ...).concat`]"
167170
).drop(1).toMap ++ List.iterate("T", 10)(s => s + ", T").map(
168171
// all 10 overloads of from:
169-
"from(" + _ + ")" -> "[use apply(T*)]"
172+
"from(" + _ + ")" -> "[use `items(T*)`]"
170173
).toMap ++ (3 to 9).map(i => {
171174
// zip3-9:
172175
val obsArgs = (1 to i).map(j => s"Observable[_ <: T$j], ").mkString("")

0 commit comments

Comments
 (0)