/*
 * Copyright (c) 2011-2016 Pivotal Software Inc, All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package reactor.adapter;

import org.reactivestreams.Publisher;
import org.reactivestreams.tck.PublisherVerification;
import org.reactivestreams.tck.TestEnvironment;
import org.testng.annotations.Test;
import rx.Observable;

/**
 * @author Stephane Maldini
 */
@Test
public class RxJavaPublisherTests extends PublisherVerification<Long> {

	public RxJavaPublisherTests() {
		super(new TestEnvironment(500, true), 1000);
	}

	@org.junit.Test
	public void simpleTest(){

	}

	@Override
	public long maxElementsFromPublisher() {
		return Integer.MAX_VALUE;
	}

	@Override
	public Publisher<Long> createPublisher(long elements) {
		return RxJava1Adapter.observableToFlux(Observable.range
				(0,
				(int)Math.min(Integer.MAX_VALUE,
				elements))).cast(Long.class);
	}

	@Override
	public Publisher<Long> createFailedPublisher() {
		return RxJava1Adapter.observableToFlux(Observable.error(new Exception
				("obs-test"))).cast(Long.class);
	}
}

@@ -961,20 +961,23 @@
 ication%3C
-Long
+Integer
 %3E %7B%0A%0A%09pu
@@ -1212,36 +1212,39 @@
 ublic Publisher%3C
-Long
+Integer
 %3E createPublishe
@@ -1364,21 +1364,17 @@
 X_VALUE,
-%0A%09%09%09%09
+ 
 elements
@@ -1376,33 +1376,16 @@
 ments)))
-.cast(Long.class)
 ;%0A%09%7D%0A%0A%09@
@@ -1411,20 +1411,23 @@
 blisher%3C
-Long
+Integer
 %3E create
@@ -1517,21 +1517,16 @@
 xception
-%0A%09%09%09%09
 (%22obs-te
@@ -1535,25 +1535,8 @@
 %22)))
-.cast(Long.class)
 ;%0A%09%7D

fix test