alexruiz / fest-assert-2.x

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

Arrays.assertContainsSequence stops after 1st potential match #153

Open dloose opened 11 years ago

dloose commented 11 years ago

Let's say I have an array that looks like this:

String[] array = new String[] { "--option", "a=b", "--option", "c=d" };

I want to assert that the array has "--option" and "c=d" in sequence, so I write this:

assertThat( array ).containsSequence( "--option", "c=d" )

The assertion shouldn't fail because the array does contain that sequence. But it does fail because Arrays.assertContainSequence assumes that the first occurrence of "--option" marks the start of the sequence.

joel-costigliola commented 11 years ago

Hi, Just to let you know that this issue has been solved in AssertJ core in 1.2.0 release (AssertJ is a fork of Fest Assert). It is not yet solved in Fest (the previous github automatic comment may be confusing).

Regards,

Joel Costigliola