Skip to content

Commit 1c66113

Browse files
author
Pedro Viegas
committed
creating test classes on test source folder
1 parent bcf6eb2 commit 1c66113

File tree

70 files changed

+514
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+514
-34
lines changed

rxjava-core/src/test/java/rx/concurrency/TestSchedulers.java renamed to rxjava-core/src/test/java/rx/SchedulersTest.java

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,41 @@
11
/**
22
* Copyright 2013 Netflix, Inc.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
*
7+
*
88
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
9+
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package rx.concurrency;
17-
18-
import static org.junit.Assert.*;
19-
20-
import java.util.Date;
21-
import java.util.concurrent.CountDownLatch;
22-
import java.util.concurrent.TimeUnit;
23-
import java.util.concurrent.atomic.AtomicBoolean;
24-
import java.util.concurrent.atomic.AtomicInteger;
25-
import java.util.concurrent.atomic.AtomicReference;
16+
package rx;
2617

2718
import org.junit.Test;
28-
29-
import rx.Observable;
3019
import rx.Observable.OnSubscribeFunc;
31-
import rx.Observer;
32-
import rx.Scheduler;
33-
import rx.Subscription;
20+
import rx.concurrency.Schedulers;
21+
import rx.concurrency.TestScheduler;
3422
import rx.subscriptions.BooleanSubscription;
3523
import rx.subscriptions.Subscriptions;
3624
import rx.util.functions.Action0;
3725
import rx.util.functions.Action1;
3826
import rx.util.functions.Func1;
3927
import rx.util.functions.Func2;
4028

41-
public class TestSchedulers {
29+
import java.util.Date;
30+
import java.util.concurrent.CountDownLatch;
31+
import java.util.concurrent.TimeUnit;
32+
import java.util.concurrent.atomic.AtomicBoolean;
33+
import java.util.concurrent.atomic.AtomicInteger;
34+
import java.util.concurrent.atomic.AtomicReference;
35+
36+
import static org.junit.Assert.*;
37+
38+
public class SchedulersTest {
4239

4340
@Test
4441
public void testComputationThreadPool1() {
@@ -447,18 +444,18 @@ public void testSubscribeOnNestedConcurrency() throws InterruptedException {
447444
Observable<String> o = Observable.from("one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten")
448445
.mapMany(new Func1<String, Observable<String>>() {
449446

450-
@Override
451-
public Observable<String> call(final String v) {
452-
return Observable.create(new OnSubscribeFunc<String>() {
453-
454-
@Override
455-
public Subscription onSubscribe(final Observer<? super String> observer) {
456-
observer.onNext("value_after_map-" + v);
457-
observer.onCompleted();
458-
return Subscriptions.empty();
459-
}
460-
}).subscribeOn(Schedulers.newThread()); // subscribe on a new thread
461-
}
447+
@Override
448+
public Observable<String> call(final String v) {
449+
return Observable.create(new OnSubscribeFunc<String>() {
450+
451+
@Override
452+
public Subscription onSubscribe(final Observer<? super String> observer) {
453+
observer.onNext("value_after_map-" + v);
454+
observer.onCompleted();
455+
return Subscriptions.empty();
456+
}
457+
}).subscribeOn(Schedulers.newThread()); // subscribe on a new thread
458+
}
462459
});
463460

464461
ConcurrentObserverValidator<String> observer = new ConcurrentObserverValidator<String>();
@@ -474,7 +471,7 @@ public Subscription onSubscribe(final Observer<? super String> observer) {
474471
fail("Error: " + observer.error.get().getMessage());
475472
}
476473
}
477-
474+
478475
@Test
479476
public void testRecursion() {
480477
TestScheduler s = new TestScheduler();
@@ -494,11 +491,11 @@ public void call(Action0 self) {
494491
subscription.unsubscribe();
495492
assertEquals(0, counter.get());
496493
}
497-
494+
498495

499496
/**
500497
* Used to determine if onNext is being invoked concurrently.
501-
*
498+
*
502499
* @param <T>
503500
*/
504501
private static class ConcurrentObserverValidator<T> implements Observer<T> {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.concurrency;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class CurrentThreadSchedulerTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.concurrency;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class ImmediateSchedulerTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.observables;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class BlockingObservableTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationAllTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationAnyTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationAverageTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationBufferTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationCacheTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationCastTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationCombineLatestTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationConcatTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationDebounceTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationDefaultIfEmptyTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationDeferTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationDematerializeTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationDistinctTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationDistinctUntilChangedTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationElementAtTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationFilterTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationFinallyTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationFirstOrDefaultTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationGroupByTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationIntervalTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationMapTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationMaterializeTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationMergeDelayErrorTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationMergeTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationMostRecentTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationMulticastTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationNextTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationObserveOnTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationOnErrorResumeNextViaFunctionTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationOnErrorResumeNextViaObservableTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationOnErrorReturnTest {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package rx.operators;
2+
3+
import org.junit.Ignore;
4+
5+
@Ignore("WIP")
6+
public class OperationOnExceptionResumeNextViaObservableTest {
7+
}

0 commit comments

Comments
 (0)