Skip to content

Commit 6f7c21b

Browse files
committed
remove joinToString() and withIndex() tests
1 parent c05d2b9 commit 6f7c21b

File tree

3 files changed

+0
-70
lines changed

3 files changed

+0
-70
lines changed

src/test/kotlin/io/reactivex/rxkotlin/ExtensionTests.kt

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,6 @@ class ExtensionTests : KotlinTests() {
170170
verify(a, times(0)).received(3)
171171
}
172172

173-
@Test fun testTakeWhileWithIndex() {
174-
listOf(1, 2, 3).toObservable()
175-
.takeWhile { x -> x < 3 }
176-
.zipWith((0..Integer.MAX_VALUE).toObservable(), BiFunction { x: Int, i: Int -> x })
177-
.subscribe(received())
178-
verify(a, times(1)).received(1)
179-
verify(a, times(1)).received(2)
180-
verify(a, times(0)).received(3)
181-
}
182173

183174
@Test fun testToSortedList() {
184175
TestFactory().numbers.toSortedList().subscribe(received())
@@ -273,24 +264,6 @@ class ExtensionTests : KotlinTests() {
273264
}
274265
}
275266

276-
@Test
277-
fun testJoinToString1() {
278-
Observable.range(1, 5)
279-
.joinToString(separator = ",")
280-
.test()
281-
.await()
282-
.assertResult("1,2,3,4,5")
283-
}
284-
285-
@Test
286-
fun testJoinToString2() {
287-
Observable.range(1, 5)
288-
.joinToString(separator = ",", prefix = "(", postfix = ")")
289-
.test()
290-
.await()
291-
.assertResult("(1,2,3,4,5)")
292-
}
293-
294267
inner class TestFactory {
295268
var counter = 1
296269

src/test/kotlin/io/reactivex/rxkotlin/FlowableTest.kt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -72,25 +72,6 @@ class FlowableTest {
7272
Assert.assertEquals((0..10).toList().reversed(), (-10..Integer.MAX_VALUE).toFlowable().skip(Integer.MAX_VALUE.toLong()).map { Integer.MAX_VALUE - it }.toList().blockingGet())
7373
}
7474

75-
@Test fun testWithIndex() {
76-
listOf("a", "b", "c").toFlowable()
77-
.withIndex()
78-
.toList()
79-
.test()
80-
.assertValues(listOf(IndexedValue(0, "a"), IndexedValue(1, "b"), IndexedValue(2, "c")))
81-
}
82-
83-
@Test fun `withIndex() shouldn't share index between multiple subscribers`() {
84-
val o = listOf("a", "b", "c").toFlowable().withIndex()
85-
86-
o.test()
87-
.await()
88-
.assertValues(IndexedValue(0, "a"), IndexedValue(1, "b"), IndexedValue(2, "c"))
89-
90-
o.test()
91-
.await()
92-
.assertValues(IndexedValue(0, "a"), IndexedValue(1, "b"), IndexedValue(2, "c"))
93-
}
9475

9576
@Test fun testFold() {
9677
val result = listOf(1, 2, 3).toFlowable().reduce(0) { acc, e -> acc + e }.blockingGet()

src/test/kotlin/io/reactivex/rxkotlin/ObservableTest.kt

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -85,30 +85,6 @@ class ObservableTest {
8585
assertEquals((0..10).toList().reversed(), result)
8686
}
8787

88-
@Test fun testWithIndex() {
89-
listOf("a", "b", "c").toObservable()
90-
.withIndex()
91-
.toList()
92-
.test()
93-
.assertValues(listOf(IndexedValue(0, "a"), IndexedValue(1, "b"), IndexedValue(2, "c")))
94-
}
95-
96-
@Test fun `withIndex() shouldn't share index between multiple subscribers`() {
97-
val o = listOf("a", "b", "c").toObservable().withIndex()
98-
99-
val subscriber1 = TestObserver.create<IndexedValue<String>>()
100-
val subscriber2 = TestObserver.create<IndexedValue<String>>()
101-
102-
o.subscribe(subscriber1)
103-
o.subscribe(subscriber2)
104-
105-
subscriber1.awaitTerminalEvent()
106-
subscriber1.assertValues(IndexedValue(0, "a"), IndexedValue(1, "b"), IndexedValue(2, "c"))
107-
108-
subscriber2.awaitTerminalEvent()
109-
subscriber2.assertValues(IndexedValue(0, "a"), IndexedValue(1, "b"), IndexedValue(2, "c"))
110-
}
111-
11288
@Test fun testReduce() {
11389
val result = listOf(1, 2, 3).toObservable().reduce(0) { acc, e -> acc + e }.blockingGet()
11490
assertEquals(6, result)

0 commit comments

Comments
 (0)