hi
Can we do this unit testing using simple public static void main(). ?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057968#4057968
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057968
Do use TestNG or JUnit for testing.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057988#4057988
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057988
___
jboss-user mailing list
Ok.
Let me clear my requirement for this pageflow.
Here is somewhat i am trying to do.
| public class Test{
|
| public test() throws Exception{
|
|
| PageFlow pageflow = PageFlow.Instance(); ---Start the pageflow here---
|
| And using this pageflow object i want to extract the
I have no idea what your use case is and no idea how to you solve your problem,
but it does not sound like a unit test to me.
If you want to create a unit test, extend your testclass from SeamTest which
will boostrap an embedded container and the seam environment. Then do as I
posted above and
OK.
You had put a comment on the pageflow-defintion.xml as it's not legal.
I am using start-page to start my pageflow. So where i need to put the start
node. I am starting my pageflow using the page rather than the start-state.
|start-page name=page2 view-id=/page2.jspx
|
This is the part of my bean:
@Name(register)
| @Stateful
| @Scope(ScopeType.CONVERSATION)
| public class RegisterBean extends Controller implements IRegister {
|
| private static final long serialVersionUID = 7559006461204534425L;
|
| @PersistenceContext(type =
Sorry for the last post as the code isn't displayed properly.
Here it is submit2.jpdl.xml
|
| pageflow-definition xmlns=http://jboss.com/products/seam/pageflow;
| xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
| xsi:schemaLocation=
|
I would think as for me your pages.xml isn't processed. Therefore you need a
method in your beans annotated with @Begin(join=true, pageflow=name).
This method should be called when you start your unit test in a NonFacesRequest
instance.
That should be all to get you running. I'll post my code
String id = new NonFacesRequest(/public/register.xhtml) {
|
| @Override
| protected void renderResponse() throws Exception {
| Contexts.getSessionContext().set(person, new
Person());
|
I think there is bug in testing(mock) environment (propagation of conversations
with pageflow does not work)
http://jira.jboss.org/jira/browse/JBSEAM-1000
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057265#4057265
Reply to the post :
BTW: Here is my pageflow definition:
?xml version=1.0 encoding=UTF-8?
| pageflow-definition xmlns=http://jboss.com/products/seam/pageflow;
| xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
| xsi:schemaLocation=http://jboss.com/products/seam/pageflow
pageflow-1.2.xsd
|
If, as Denis says, that bug exists, then it's not going to work!
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057349#4057349
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057349
Since JBSEAM-1000 does not allow be to post a comment on this I'll do this here:
Here is a part of my logfile related to this problem:
[DEBUG] 15:43:42.965 jsf.SeamPhaseListener - after phase:
RESTORE_VIEW 1
| [DEBUG] 15:43:42.965 core.Events - Processing
The pageflow testing does not work for me. On subsequent requests the pageflow
is lost and set to null.
Below is my code. Anyone can give me a hint on how to do this the correct way?
There are no examples in seam releases or even cvs.
String id = new
Possibly this is caused by missing AbstractSeamJsfListener or ContextFilter,
since test cases are not executing inside of a webapp. But both classes above
call 'handleConversationPropagation' where the pageflow is validated and the
conversation is restored (but I'm a noob to seam).
View the
Nope, the phase listener is registered and called, but I don't see the method
call to afterRestoreView().
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057371#4057371
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057371
@ knisterPeter
hi
i am getting the same problem. I'm also making a test class for the
pageflow.Its a simple pageflow-definition
Code :
pageflow-definition xmlns=http://jboss.com/products/seam/pageflow;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=
It's definitely possible, but I don't know how to make it pretty. Here's an
example from one of my tests:
log.info(Begin testing initial mapping);
| setViewId(MappingViewId.APPLICABLE_FIELDS.id);
| invokeMethod(#{catalogMapping.beginForInitialMapping()});
Thanks for your help. I'll give that all a try on monday. :)
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4056997#4056997
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056997
It does work, but you really have to carefully simulate the browser to make it
work. Note that those methods are all in SeamTest (now no doubt in
BaseSeamTest). You'll find methods there to set request parameters and other
things that simulate the browser.
View the original post :
20 matches
Mail list logo