Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrays.assertContainsSequence stops after 1st potential match #153

Open
dloose opened this issue Apr 18, 2013 · 1 comment
Open

Arrays.assertContainsSequence stops after 1st potential match #153

dloose opened this issue Apr 18, 2013 · 1 comment

Comments

@dloose
Copy link

dloose commented Apr 18, 2013

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants