alexruiz / fest-assert-2.x

FEST Fluent Assertions 2.x
http://fest.easytesting.org
Apache License 2.0
401 stars 69 forks source link

ListAssert containsExactly not working #156

Closed falkorichter closed 11 years ago

falkorichter commented 11 years ago

We´re using the ListAssert containsExactly, and I´m getting the following error

java.lang.NoSuchMethodError: org.fest.util.Collections.list([Ljava/lang/Object;)Ljava/util/List; at org.fest.assertions.ListAssert.containsExactly(ListAssert.java:193)

When looking at the source, I see that list() is not defined.

public ListAssert containsExactly(Object... objects) {
    validateIsNotNull(objects);
    return isNotNull().isEqualTo(list(objects));
 }

we´re building with maven, here are our versions:

<fest-assert-core.version>2.0M10</fest-assert-core.version>
<fest-assert.version>1.4</fest-assert.version>
<fest-util.version>1.2.5</fest-util.version>
falkorichter commented 11 years ago

Found the problem, the util-version we are referencing fixed bug for our integration tests, but fest-assert is still referencing the old version.

Fixed by using 2 versions of util in the integration and main project

falkorichter commented 11 years ago

Here is the bug that forced us to move forward with the dependency https://github.com/alexruiz/fest-util/issues/16

joel-costigliola commented 11 years ago

You can also use AssertJ a fork of Fest Assert that does not have any dependencyand thus no such problems.

Hmhadhbi commented 8 years ago

I am facing the same issue with fest-assert-1.4.jar and fest-util.version 1.2.5: java.lang.NoSuchMethodError: org.fest.util.Collections.list([Ljava/lang/Object;)Ljava/util/List

What is the recommended version of fest-assert that fix this issue? @joel-costigliola

joel-costigliola commented 8 years ago

see https://github.com/alexruiz/fest-assert-2.x/issues/170