struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel Almeida <mig...@almeida.at>
Subject Message lookup (from key) in Test
Date Wed, 16 Nov 2011 11:57:26 GMT
Dear all,

I am unit-testing an application under the skin using
SpringStrutsTestCase as base (actually, things are a bit more
complicated because I'm doing it from Cucumber, but that's another
story).

How do you get the value of your message from within the test? The
assertion I'm trying is:

assertEquals(expectedMessage,
action.getActionErrors().iterator().next());

But actionErrors() contains the key (error.authorisation) and not the
value ("you cannot do this"). What's the cleanest way to retrieve the
value from the test?


Cheers,

Miguel Almeida

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message