>>> I never understand how to "inject" mock members annotated
>>> with @Parameter into a page when testing with Testify.
>>
>> I'm not sure I understand the question. I thought @Parameter only made
>> sense for components - not pages.
>
> That's exactly one of the few differences between component
Hi!
I never understand how to "inject" mock members annotated
with @Parameter into a page when testing with Testify.
Anyone knows how to do that?
Mats
PS. Oh, what about @Environmental members? Same question.
-
To unsubscribe
Hi!
I use Testify to smoke test our pages, and currently I have
problems with a non-empty onActivate() function:
public Object onActivate(Long id) {
// ...
}
What do I need to mock to get this onActivate() function to
be called?
Mats
Hi!
I'm trying to create a simple smoke test of all pages, like this:
@Test
public void testRenderPages() {
Collection pages =
classNameLocator.locateClassNames(PAGES_PACKAGE);
tellMockitoHowToMock();
for (String page : pages) {
String pagePath = getPagePath(page);
>> Hi!
>
> Hi!
Hi!
You Tapestry guys are slow today. It took a whopping 8 minutes to
get an answer... ;-)
>> So, what would you guys do? Is there a simpler solution? A filter?
>
> I would use a ResquestFilter or a Dispatcher checking some service (that
> would hold the underDDoS field) and red
t to interact? A Tapestry page or a simple
>> HTML page (which I think should be better when are under a DDOS attack) ?You
>> have a lot of places where you can interact, depending on the previous
>> question :-)
>>
>>
>> On Wed, Oct 14, 2009 at 2:08 PM, Mats Henri
Hi!
I'm working on a Tapestry 5.1 site that frequently gets hammered
by DDOS attacks. We recently talked about it in our team, and one
idea I'm currently investigating is to have a flag in our system
that I can turn on dynamically that would require all users to be
logged in.
So, real users would
Hi!
I need to map three Acegi exceptions to specific pages:
org.acegisecurity.AccountExpiredException
org.acegisecurity.CredentialsExpiredException
org.acegisecurity.LockedException
I can't see how to do it in contributeApplicationDefaults(),
since there doesn't appear to be configurati
Paul Field wrote:
> Mats Henricson wrote on 10/09/2009 14:59:32:
>> How should we make Testify aware of asset and context?
>> For example, we have this in our TML:
>>${context:/foo/bar/}
>> Currently testify barfs at us like this:
>>
>> Caused by: java.
Hi!
How should we make Testify aware of asset and context?
For example, we have this in our TML:
${context:/foo/bar/}
Currently testify barfs at us like this:
Caused by: java.lang.RuntimeException: Unable to locate asset
'context:foo/bar' (the file does not exist).
at
org.apache.t
Paul Field wrote:
> Mats Henricson wrote on 08/09/2009 09:41:56:
>> Mats Henricson wrote:
>>> So, how should I inject my mocked @SessionState object? Is it
>>> possible through the tester object, before I render the page?
>> I'm te
Mats Henricson wrote:
> Paul Field wrote:
>> Mats Henricson wrote on 07/09/2009 12:48:39:
>>
>>> I am really close to get my Testify machinery working for
>>> my first non-trivial page. The last hurdle (touch on wood)
>>> is that the @ForComponents annot
Paul Field wrote:
> Mats Henricson wrote on 07/09/2009 12:48:39:
>
>> I am really close to get my Testify machinery working for
>> my first non-trivial page. The last hurdle (touch on wood)
>> is that the @ForComponents annotation doesn't inject my
>> m
Hi!
I am really close to get my Testify machinery working for
my first non-trivial page. The last hurdle (touch on wood)
is that the @ForComponents annotation doesn't inject my
mock object in fields annotated with @SessionState.
I can't see any example doing this, so, does it work? Am I
on the wr
Hi!
I'm getting pretty close now. I've managed to get to the
renderPage() function, where I get a NPE:
Caused by: java.lang.NullPointerException
at
org.apache.tapestry5.internal.renderers.RequestRenderer.render(RequestRenderer.java:48)
What happens on that line is:
String contextPat
ublic boolean service(Request request, Response response,
>>> RequestHandler handler) throws IOException {
>>> requestGlobals.storeServletRequestResponse(mock
>>> (HttpServletRequest.class), mock(HttpServletResponse.class));
>>> re
ndler.service(request, response);
>> }
>> };
>> config.add("EnsureNonNullHttpRequestAndResponse", filter,
>> "before:*");
>> }
>>
>> Kind regards,
>> Peter
>>
>>
>> - Ori
uest.class), mock(HttpServletResponse.class));
> return handler.service(request, response);
> }
> };
> config.add("EnsureNonNullHttpRequestAndResponse", filter,
> "before:*");
> }
>
> Kind regards,
> Peter
>
&
>> My current guess is that @ForComponents is pulling in and handling
>> binding from my real AppManager, even though it is in no way part
>> of the test.
>
> In that case try creating the TapestryTester with a nonsense app name:
>
>private static final TapestryTester SHARED_TESTER
>=
Hi!
Since Testify isn't working for me, I thought I'd look at
this page:
http://tapestry.apache.org/tapestry5.1/guide/unit-testing-pages.html
It has this example:
PageTester tester = new PageTester(appPackage, appName, "...");
Object[] context = new Object[]{ "abc", 123 };
Document doc = tester
>>> Caused by: java.lang.RuntimeException: Service id 'xyzConfig' is
>>> not defined by any module. Defined services: AccessDecisionManager,
>>> ... VirtualAssetStreamer.
>> Something is trying to look up a service with id "xyzConfig" - using that
>> id. I assume you have something like this in y
> Hi Mats,
Hi!
>> I then have a subclass with the JUnit 4 test:
>>
>> public class GamesLauncherTest extends AbstractPageTest {
>>
>> @ForComponents @Mock
>> private XyzManager xyzManager;
>>
>> @Mock
>> private XyzConfig xyzConfig;
>>
>>
>> What I get is runtime exceptions, such
Hi!
I've spent some time now trying to get Testify working.
I do it according to the documentation, with an abstract
base class like this:
public abstract class AbstractPageTest extends TapestryTest {
private static final String APP_PACKAGE = "com.expekt.web";
private static final Tapest
This may be elementary, but we have two cases where we don't want our users
to be
able to use the browsers back button:
1. After a submit of a form, when we've sent them to a new page saying "Your
blah blah
blah has been submitted successfully". Allowing users to go back and
submitting
again,
t;New" as the prefix to the page names?
Can I call them whatever I want?
* Do the backing Java classes implement any special interfaces?
* Do I need to do anything in hivemodule.xml ?
Sorry for these idiotic questions, but it doesn't work as is.
Mats
On 10/20/06, Andreas Andreou
Hi!
I think that page describes how to do it in Tapestry 3.
I use this in 4, and it works:
GeneralError is my page, and it has a corresponding Java, HTML and page
class.
Unfortunately you can't handle stale sessions the same way. I've struggled
with that for about two days now. The info I
Hi!
I've spent too much time trying to figure out how this is done in Tapestry
4.
I found this suggestion on the net:
The exception page works fine, but the stale session/link does not.
Does the accompanying Java page file need to extend a specific base?
I need n
27 matches
Mail list logo