import java.util.List;
import org.testng.annotations.Ignore;
import org.testng.annotations.Test;
public class TestTestNgLists {
@Test
public void testArrayOk() {
assertEqualsNoOrder(
new String[] { "a", "b", "c" },
new String[] { "c", "b", "a" });
}
@Test
@Ignore("This test fails as expected!")
public void testArrayShouldFail() {
assertEqualsNoOrder(
new String[] { },
new String[] { "c", "b", "a" });
}
@Test
@Ignore("This test fails as expected!")
public void testArrayWithDuplicatesShouldFail() {
assertEqualsNoOrder(
new String[] { "c", "c", "b", "a" },
new String[] { "c", "b", "a" });
}
@Test
public void testListOk() {
assertEqualsNoOrder(
List.of("a", "b", "c"),
List.of("c", "b", "a" ));
}
@Test
public void testListShouldFail() {
// NOTE: This test succeeds surprisingly!!
assertEqualsNoOrder(
List.of(),
List.of("c", "b", "a" ));
}
@Test
public void testListWithDuplicatesShouldFail() {
// NOTE: This test succeeds surprisingly!!
assertEqualsNoOrder(
List.of("c", "c", "b", "a"),
List.of("c", "b", "a" ));
}
}