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 foundexception. 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 problemwith your component: if your test can't use your component as it is, then how can another component use it?
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
knowsthat the component
securityServiceis 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!
Matt, indeed there was a
conceptual problemwith 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!