// Path: collection-matchers/src/main/java/ru/yandex/qatools/matchers/collection/HasSameItemsAsCollectionMatcher.java
// @Factory
// public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) {
//     return new HasSameItemsAsCollectionMatcher<>(correctList);
// }


import org.junit.Test;
import java.util.Arrays;
import java.util.List;
import static org.hamcrest.MatcherAssert.assertThat;
import static ru.yandex.qatools.matchers.collection.HasSameItemsAsCollectionMatcher.hasSameItemsAsCollection;
package ru.yandex.qatools.matchers.collection;




/**
 * Created with IntelliJ IDEA.
 * User: lanwen
 * Date: 23.05.13
 * Time: 2:44
 */
public class HasSameItemsAsCollectionMatcherTest {

    @Test(expected = AssertionError.class)
    public void withOnlyOneCommonElement() throws Exception {
        List<String> actual = Arrays.asList("1", "2", "3", "4", "7");
        List<String> expected = Arrays.asList("3", "4", "5");

// Path: collection-matchers/src/main/java/ru/yandex/qatools/matchers/collection/HasSameItemsAsCollectionMatcher.java
// @Factory
// public static <T> Matcher<Collection<? extends T>> hasSameItemsAsCollection(Collection<? extends T> correctList) {
//     return new HasSameItemsAsCollectionMatcher<>(correctList);
// }


// Path: collection-matchers/src/test/java/ru/yandex/qatools/matchers/collection/HasSameItemsAsCollectionMatcherTest.java
import org.junit.Test;
import java.util.Arrays;
import java.util.List;
import static org.hamcrest.MatcherAssert.assertThat;
import static ru.yandex.qatools.matchers.collection.HasSameItemsAsCollectionMatcher.hasSameItemsAsCollection;

package ru.yandex.qatools.matchers.collection;




/**
 * Created with IntelliJ IDEA.
 * User: lanwen
 * Date: 23.05.13
 * Time: 2:44
 */
public class HasSameItemsAsCollectionMatcherTest {

    @Test(expected = AssertionError.class)
    public void withOnlyOneCommonElement() throws Exception {
        List<String> actual = Arrays.asList("1", "2", "3", "4", "7");
        List<String> expected = Arrays.asList("3", "4", "5");

        assertThat(actual, hasSameItemsAsCollection(expected));