Closed GoogleCodeExporter closed 9 years ago
There are plans for this for the 2.0 release (or later, everything depends on
how much time I have).
Original comment by johan.ha...@gmail.com
on 3 Jun 2013 at 6:49
I'm not sure it's exactly the same topic. I support #44 too because I don't
really like the form of assertions of RA but in this one I just want to be able
to read twice the body :)
It's not a big deal, will just remove 1 line from all my tests where I have to
extract the body to a "readable twice" source, like String instead of
InputStream.
You just need to keep a copy of the byte[] of the body somewhere, and
eventually recreate the String/InputStream when someone ask for it I guess
Original comment by lorber.s...@gmail.com
on 3 Jun 2013 at 8:18
If you get the content as an input stream you are on your own (you need to
close the stream manually as well because RA can't do that for you). You cannot
read contents from an input stream more than once. If you need to do that then
you should convert it to a String or byte[] just as you imply. The reason why
I don't think it's a good idea to let RA copy the content is if you want
performance.
Original comment by johan.ha...@gmail.com
on 3 Jun 2013 at 8:26
I understand.
Just not sure performance is an important point for a test framework.
Original comment by lorber.s...@gmail.com
on 3 Jun 2013 at 8:29
True, but people are using RA for non test purposes as well. Since version 1.8
JsonPath and XmlPath have been extract to their own projects which is the first
step in creating RA more modular and in the future more production ready as
well.
Original comment by johan.ha...@gmail.com
on 3 Jun 2013 at 8:33
Original issue reported on code.google.com by
lorber.s...@gmail.com
on 30 May 2013 at 4:35