benjamin84 / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

Add ListAssert #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From Konstantin Scheglov:

I need to check not just generic java.util.Collection, but
java.util.List, and this List should have only specified elements and
in particular order. Nearest (convenient) approximation now is
"containtsOnly", but it still worries me that my test does not check
as much as it could.

Can you add ListAssert with additional method
"equals(Object...elements)", or something like this?

Original issue reported on code.google.com by Alex.Rui...@gmail.com on 18 Feb 2008 at 8:52

GoogleCodeExporter commented 9 years ago
2. containsSequence(Object...elements)
     Verifies that the actual List contains the given sequence of objects, without
any other objects between them.

3. containsOrder(Object...elements)
     Verifies that the actual List contains the all given objects in same order as
given. In contrast to #containsSequence, it is possible that there are other 
objects
in the middle.

4. endsWith(Object...elements)
     Same as #containsSequence, but verifies also that last given object is also last
element of List.

5. startsWith(Object...elements)
     Same as #containsSequence, but verifies also that first given object is also
first element of List.

Original comment by Konstant...@gmail.com on 18 Feb 2008 at 9:26

GoogleCodeExporter commented 9 years ago
6. isEqual(T... items) 
   Same as isEqual(Collection<t> items) but saves using org.fest.util.Collections.list

for ListAssert
8. contains(Object o, int atIndex)
   asserts that Object o is at index atIndex

Original comment by cbr...@gmail.com on 27 Feb 2008 at 11:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Issue migrated to http://jira.codehaus.org/browse/FEST-59

Original comment by Alex.Rui...@gmail.com on 5 Mar 2009 at 8:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Fixed. Please see JIRA issue for more details.

cbraid, I'd like to add you to the list of contributors (I'm adding Konstantin 
as
well.) If you agree, please send me your name to alex.ruiz.05 at gmail.com.

Konstantin & cbraid, if you have a personal website or blog, I'd like to link 
to it
from the list of contributors. Please send me the links to the e-mail address I
specified above.

Thanks for helping us improve FEST! :)

-Alex

Original comment by Alex.Rui...@gmail.com on 30 Mar 2009 at 8:04