smartrics/RestFixture — Issue #7: RestFixtureWithSeq doesn't seem to work, or throws exception
Author: lachelt
Created: 2012-02-01 17:06:08+00:00
State: open

When I try to use RestFixtureWithSeq on my own pages either nothing happens (I don't see a diagram), or I get an exception on the POST.

For example this test:

!|smartrics.rest.fitnesse.fixture.RestFixtureWithSeq|http://${HOST_PORT}|deleteAccounts.gif|
|DELETE|/account?confirmDelete|200|||

Appears just like it does when I use RestFixture, except it displays the name of the gif in the table.

Here's the exception I get when I use RestFixtureWithSeq on a POST...

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:571)
at java.util.ArrayList.get(ArrayList.java:349)
at smartrics.rest.fitnesse.fixture.RestFixtureWithSeq.POST(RestFixtureWithSeq.java:216)

This is the test that throws that exception...

!|smartrics.rest.fitnesse.fixture.RestFixtureWithSeq|http://${HOST_PORT}|createAccount.gif|
|setBody|{ "emailAddr" : "jackson.pollack@hp.com"}|
|POST|/account|201||jsonbody.emailAddr=="jackson.pollack@hp.com"|

But this works just fine...

!|smartrics.rest.fitnesse.fixture.RestFixture|http://${HOST_PORT}|
|setBody|{ "emailAddr" : "jackson.pollack@hp.com"}|
|POST|/account|201||jsonbody.emailAddr=="jackson.pollack@hp.com"|

NOTE: when I view the RestFixture live documentation I don't see any sequence diagrams.... but I don't see any exceptions either.