// Path: src/main/java/com/diffplug/common/rx/RxOrderedSet.java
// public enum OnDuplicate {
// 	/** Throws an error when a duplicate is encountered. */
// 	ERROR,
// 	/** Resolve duplicates by taking the first duplicate in the list. */
// 	TAKE_FIRST,
// 	/** Resolve duplicates by taking the last duplicate in the list. */
// 	TAKE_LAST
// }


import com.diffplug.common.collect.ImmutableList;
import com.diffplug.common.rx.RxOrderedSet.OnDuplicate;
import java.util.Arrays;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
/*
 * Copyright 2020 DiffPlug
 *
 * 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
 *
 *     https://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 com.diffplug.common.rx;



public class RxOrderedSetTest {
	@Test
	public void testDisallowDuplicates() {
		// first and last
// Path: src/main/java/com/diffplug/common/rx/RxOrderedSet.java
// public enum OnDuplicate {
// 	/** Throws an error when a duplicate is encountered. */
// 	ERROR,
// 	/** Resolve duplicates by taking the first duplicate in the list. */
// 	TAKE_FIRST,
// 	/** Resolve duplicates by taking the last duplicate in the list. */
// 	TAKE_LAST
// }


// Path: src/test/java/com/diffplug/common/rx/RxOrderedSetTest.java
import com.diffplug.common.collect.ImmutableList;
import com.diffplug.common.rx.RxOrderedSet.OnDuplicate;
import java.util.Arrays;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;

/*
 * Copyright 2020 DiffPlug
 *
 * 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
 *
 *     https://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 com.diffplug.common.rx;



public class RxOrderedSetTest {
	@Test
	public void testDisallowDuplicates() {
		// first and last
		testCase(Arrays.asList(1, 2, 3, 4, 5), Arrays.asList(1, 2, 3, 4, 5, 1), OnDuplicate.TAKE_FIRST, Arrays.asList(1, 2, 3, 4, 5));