I know :) as I wrote in the previous mail I have tried both ways, but still
not working
On Wed, Sep 10, 2014 at 9:09 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:
> On Wed, 10 Sep 2014 15:40:25 -0300, Boris Horvat
> wrote:
>
> public String[] onPassivate() {
>>
>> String
This is getting a bit off topic for the tapestry user's list... I suggest
you do some further reading on mockito
It would probably look something like this:
Link link = mock(Link.class);
when(link.toAbsoluteURI()).thenReturn("http://test1";);
when(pageRenderLinkSource.createPageRenderLinkWithCont
It looks like .toAbsolute is null, but without it I can not return a
String. hmm Any thoughts?
On Wed, Sep 10, 2014 at 2:43 PM, George Christman
wrote:
> Lance, I think I'm really close lol. I think my struggles have to do with
> the concept of having to mock a service.
>
> Anyhow I have the fol
On Wed, 10 Sep 2014 15:40:25 -0300, Boris Horvat
wrote:
public String[] onPassivate() {
String[] a = new String[3];
a[0] = selectedScene != null ? selectedScene.getId().toString() :
null;
a[1] = selectedShot != null ? selectedShot.getId().toString() :
null;
a[
Lance, I think I'm really close lol. I think my struggles have to do with
the concept of having to mock a service.
Anyhow I have the following mock
public static PageRenderLinkSource buildPageRenderLinkSource() {
PageRenderLinkSource pageRenderLinkSource =
Mockito.mock(PageRenderLinkSourc
Sadly still the same when I tried.
public Object[] onPassivate() {
List a = new ArrayList();
a.add(selectedScene);
a.add(selectedShot);
a.add(selectedComponent);
return a.toArray();
}
Also I tried
public String[] onPassivate() {
String[] a =
On Wed, 10 Sep 2014 14:14:01 -0300, Boris Horvat
wrote:
public List onPassivate() {
List a = new ArrayList();
a.add(selectedScene);
a.add(selectedShot);
a.add(selectedComponent);
return a;
}
onPassivate() doesn't work returning a List. Return
I have tried with EventContext
public void onActivate(EventContext eventContext) {
if (eventContext.getCount() == 3) {
activate(eventContext.get(Scene.class, 0),
eventContext.get(Shot.class, 1), eventContext.get(ShotComponent.class, 2));
} else if (eventContext.get
Ah, ok..
Adding the tapestry web module will cause headaches. I suggest you add
builder methods to your test module for the specific web dependencies
required for the service under test. Similar to how the Request is
currently mocked.
On 10 Sep 2014 18:09, "George Christman" wrote:
> Integratio
There is an in mem database
Two services
The second service layer contains PageRenderLinkSource
On Wed, Sep 10, 2014 at 1:08 PM, George Christman
wrote:
> Integration testing.
>
> On Wed, Sep 10, 2014 at 1:06 PM, Lance Java
> wrote:
>
>> There's 2 types of tests that I feel are getting blurred
Integration testing.
On Wed, Sep 10, 2014 at 1:06 PM, Lance Java
wrote:
> There's 2 types of tests that I feel are getting blurred here
>
> 1. Unit test - tests a single class. All dependencies are mocked
>
> 2. Integration test - tests 2 or more services in concert (might involve a
> tapestry m
There's 2 types of tests that I feel are getting blurred here
1. Unit test - tests a single class. All dependencies are mocked
2. Integration test - tests 2 or more services in concert (might involve a
tapestry module and an in memory database)
Which test are you trying to achieve here?
On 10 S
I'm not very framilar with Mockito, So I'm assuming you would do something
like this in AppModuleTest?
public static PageRenderLinkSource buildPageRenderLinkSource() {
return Mockito.mock(PageRenderLinkSource.class);
}
Next question is how do I go about passing it to the constructor?
Unit tests don't need a module at all. Your colleague could mock the
PageRenderLinkSource using Mockito and pass it to the EmailService
constructor. Then test the hell out of it!
On 10 Sep 2014 17:41, "George Christman" wrote:
> Thanks Lance, I figured out the DAO issue :) Anyhow this happens to
We'll have to talk about mocking over the weekend, probably going to need a
lesson in it ;) Unit testing is still pretty new to me, so lots to learn
yet.
On Wed, Sep 10, 2014 at 12:40 PM, Lance Java
wrote:
> Testing web stuff gets a bit messier, as I said before I usually have
> simple pass thro
Thanks Lance, I figured out the DAO issue :) Anyhow this happens to be my
day job project and my co-worker is looking to test his generated emails.
So if I understand you correctly, I need to include the tapestry-core? If
so, is that just a mater of including TapestryModule or no?
On Wed, Sep 10,
Testing web stuff gets a bit messier, as I said before I usually have
simple pass throughs from web to api and concentrate my unit testing on the
api layer.
Having two modules can really define this separation and forces you to do
the right thing.
Loading all the tapestry web module gets messy si
Hi George, PageRenderLinkSource is a part of the web framework.
I mentioned before that you could split your app into 2 modules:
api - depends on tapestry-ioc
web - depends on tapestry-core
The test case I setup for you only tests the api stuff (tapestry-ioc). If
you split into 2 modules this wou
Some more oddities, I looks as if I'm able to get past this issue if I use
@InjectService as Chris described, however I noticed if I try to do any
saves in the GenericDAO, it fails. I'm also running into problems where my
services are looking for Tapestry services but can't find them. Example
PageR
Yes, that was my initial solution but I ran into problems, but strangely it
seems to work fine now?!
I just call the onX event I already use for catching the bubbled up events, so
it seems I can remove my doRefresh and onRefresh code afterall.
Confused but happy :)
- Original Message --
It looks like I'm wrong.
Ultimately Registry.getService(Class) passes through to
Module.findServiceIdsForInterface() which ultimately finds all services
where: serviceInterface.isAssignableFrom(def.getServiceInterface())
So it works the same as spring IOC which really surprised me.
So, as Chri
> Now it works perfectly.
Great! I'll add an issue to copy the isSecure() flag from the async
request.
> how can I override your "tapesty-atmosphere.js"?
stick it in the right path under WEB-IBF/classes and your container's
classloader will give it precedence.
Sorry email prematurely sent.
Exception with some output showing where the code is breaking. The first
query using sessionManager in the test class runs, the second query in the
service using the genericDAO fails.
[TestNG] Running:
Command line suite
[WARN ] (ConfigContext.java:257) - HSEARCH0
Thank you, Lance!
Now it works perfectly.
And one more question: I would like to push custom javascript using
atmosphere. I've seen this
https://github.com/uklance/tapestry-atmosphere/issues/5 and my
question is, how can I override your "tapesty-atmosphere.js"?
Thanks,
Sem
--
Hi Lance, I hear ya, same here.
Okay I'm going to provide all the code and the full exception.
* AppModuleTest *
public class AppModuleTest {
public static void bind(ServiceBinder binder) {
try {
ClassLoader contextClassLoader =
Thread.currentThread().getContex
Hi,
How do I get a kaptcha image to refresh when a zone is rerendered on an ajax
request? At present this only happens for a form that submits for the page.
Without a new code the next validation always fails.
John
---
This email is free from viruses and malware because avast! Antivirus protec
I think I've seen messages on the mailing lists about problems related to
multiple onActivate's a long time ago.
https://issues.apache.org/jira/browse/TAPESTRY-1730 seems to suggest that
the method with the most parameters is called first, but whether the
execution stops here or continues to the n
No, this is a new feature.
Your onActivate methods are very complex. Have you considered a single
onActivate(EventContext)?
Perhaps the '-' in '-3' is just a presentation issue.
I think the main culprit is likely to be your onPassivate(). Does it return
all 3 objects (when populated).
Yea -3 is not propet db id, but what could have changed it into negative
number...strange
Is this partbof the 5.3.7 or 5.4 as I am still on the old offucial version.
I can try it out tonight and see what happen
Thanks
On 10 Sep 2014 09:16, "Lance Java" wrote:
> > Exception in method null, para
> Exception in method null, parameter #1: Could not find a coercion from
type java.lang.String to type Scene. context - 3
It looks like the context is -3? Is this primary key in the database?
> Also annotation wont, really work for me as I have more then one field
You might be interested in thi
That's not my understanding of how the tapestry registry works. Spring ioc
works like this but tapestry should bind the service to the interface
supplied by your module.
On 10 Sep 2014 07:48, "Chris Poulsen" wrote:
> Hi,
>
> Isn't this a matter of indicating which session you want injected? ( I
31 matches
Mail list logo