-
1. Re: Component not created in SeamTest
matt.nirgue Dec 22, 2008 9:53 AM (in response to nbhatia.bhatian.comcast.net)the username property is private so if you don't have a getter/setter you won't be able to use getValue nor setValue on this property... since it's private, you shouldn't be able to access it outside of your class which is why you get a
property not found
exception. Either you add the getter/setter for this property or you find a workaround...You have to be careful though: you shouldn't have to change your component JUST for your test... IMO, that would mean there's a
conception problem
with your component: if your test can't use your component as it is, then how can another component use it?Regards,
Matt.
-
2. Re: Component not created in SeamTest
matt.nirgue Dec 22, 2008 10:30 AM (in response to nbhatia.bhatian.comcast.net)BTW, your component is created... as I said, this is not the problem here!
Property 'username' is not found on type: myApp.SecurityService_$$_javassist_0
>> This means that Seam is trying to access the username property of a SecurityService component... which means that Seam
knows
that the componentsecurityService
is a SecurityService component, which also means that this component has been created... you would have had a NullPointerException (or something like) that if your component has not been created! -
3. Re: Component not created in SeamTest
nbhatia.bhatian.comcast.net Dec 22, 2008 4:15 PM (in response to nbhatia.bhatian.comcast.net)Matt, indeed there was a
conceptual problem
with my component :-). This is related to my another post that you answered so nicely.Originally my component was written so that username and password were passed in as parameters to the createUser() method. However since I did not know how to invoke the method with parameters in SeamTest, I switched to properties - obviously a bad decision! However, now that I have the answer to my original problem, I have switched back to parameters and life is good!
Thanks.
Naresh