[jboss-cvs] jboss-seam/src/test/misc/org/jboss/seam/test ...

Gavin King gavin.king at jboss.com
Wed Jul 25 10:40:31 EDT 2007


  User: gavin   
  Date: 07/07/25 10:40:31

  Modified:    src/test/misc/org/jboss/seam/test        ComponentTest.java
                        LocaleTest.java MailTest.java PageflowTest.java
                        PhaseListenerTest.java SeamTestTest.java
                        TimeZoneTest.java
  Log:
  fix some problems with test suite
  
  Revision  Changes    Path
  1.11      +5 -3      jboss-seam/src/test/misc/org/jboss/seam/test/ComponentTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ComponentTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/test/misc/org/jboss/seam/test/ComponentTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- ComponentTest.java	25 Jun 2007 16:49:39 -0000	1.10
  +++ ComponentTest.java	25 Jul 2007 14:40:31 -0000	1.11
  @@ -1,4 +1,4 @@
  -//$Id: ComponentTest.java,v 1.10 2007/06/25 16:49:39 gavin Exp $
  +//$Id: ComponentTest.java,v 1.11 2007/07/25 14:40:31 gavin Exp $
   package org.jboss.seam.test;
   
   import org.jboss.seam.Component;
  @@ -66,10 +66,12 @@
         assert c.getBeanClass()==EjbBean.class;
         assert c.getType()==ComponentType.STATEFUL_SESSION_BEAN;
         assert c.getScope()==ScopeType.EVENT;
  -      assert !c.hasDestroyMethod();
  +      assert c.hasDestroyMethod();
  +      assert !c.hasDefaultRemoveMethod();
         assert !c.hasCreateMethod();
         assert c.getCreateMethod()==null;
  -      assert c.getDestroyMethod()==null;
  +      assert c.getDestroyMethod()!=null;
  +      assert c.getDefaultRemoveMethod()==null;
         assert c.getInAttributes().size()==0;
         assert c.getUnwrapMethod()==null;
         assert c.getOutAttributes().size()==0;
  
  
  
  1.2       +0 -4      jboss-seam/src/test/misc/org/jboss/seam/test/LocaleTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LocaleTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/test/misc/org/jboss/seam/test/LocaleTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- LocaleTest.java	13 Jul 2007 16:08:46 -0000	1.1
  +++ LocaleTest.java	25 Jul 2007 14:40:31 -0000	1.2
  @@ -2,16 +2,12 @@
   
   import java.io.IOException;
   import java.util.Locale;
  -import java.util.TimeZone;
   
  -import javax.ejb.Local;
  -import javax.faces.component.UIComponentBase;
   import javax.faces.component.UIOutput;
   import javax.faces.event.ValueChangeEvent;
   
   import org.jboss.deployers.spi.DeploymentException;
   import org.jboss.seam.international.LocaleSelector;
  -import org.jboss.seam.international.TimeZoneSelector;
   import org.jboss.seam.mock.SeamTest;
   import org.testng.annotations.Test;
   
  
  
  
  1.2       +1 -5      jboss-seam/src/test/misc/org/jboss/seam/test/MailTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MailTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/test/misc/org/jboss/seam/test/MailTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- MailTest.java	13 Jul 2007 16:08:46 -0000	1.1
  +++ MailTest.java	25 Jul 2007 14:40:31 -0000	1.2
  @@ -1,7 +1,5 @@
   package org.jboss.seam.test;
   
  -import java.io.InputStreamReader;
  -import java.io.Reader;
   import java.util.ArrayList;
   
   import javax.mail.NoSuchProviderException;
  @@ -10,8 +8,6 @@
   
   import org.jboss.seam.mail.MailSession;
   import org.jboss.seam.mail.MeldwareUser;
  -import org.jboss.seam.text.SeamTextLexer;
  -import org.jboss.seam.text.SeamTextParser;
   import org.testng.annotations.Test;
   
   import com.sun.mail.smtp.SMTPSSLTransport;
  @@ -361,7 +357,7 @@
         // We can't get a Session from JNDI without a full container.
         try
         {
  -         Session session = mailSession.getSession();
  +         mailSession.getSession();
         }
         catch (Exception e)
         {
  
  
  
  1.7       +2 -2      jboss-seam/src/test/misc/org/jboss/seam/test/PageflowTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PageflowTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/test/misc/org/jboss/seam/test/PageflowTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- PageflowTest.java	13 Jul 2007 16:08:46 -0000	1.6
  +++ PageflowTest.java	25 Jul 2007 14:40:31 -0000	1.7
  @@ -66,7 +66,7 @@
       jbpmContext.close();
     }
     
  -  /*@Test
  +  @Test
     public void testOrderPageflow() {
        StringReader stringReader = new StringReader(
         "<pageflow-definition name='checkout'>" +
  @@ -105,6 +105,6 @@
       assert start.equals(token.getNode());
       
       processInstance.signal();
  -  }*/
  +  }
     
   }
  
  
  
  1.42      +3 -1      jboss-seam/src/test/misc/org/jboss/seam/test/PhaseListenerTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PhaseListenerTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/test/misc/org/jboss/seam/test/PhaseListenerTest.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -b -r1.41 -r1.42
  --- PhaseListenerTest.java	20 Jun 2007 22:12:58 -0000	1.41
  +++ PhaseListenerTest.java	25 Jul 2007 14:40:31 -0000	1.42
  @@ -1,4 +1,4 @@
  -//$Id: PhaseListenerTest.java,v 1.41 2007/06/20 22:12:58 gavin Exp $
  +//$Id: PhaseListenerTest.java,v 1.42 2007/07/25 14:40:31 gavin Exp $
   package org.jboss.seam.test;
   
   import java.util.ArrayList;
  @@ -23,6 +23,7 @@
   import org.jboss.seam.core.Events;
   import org.jboss.seam.core.Init;
   import org.jboss.seam.core.Manager;
  +import org.jboss.seam.core.ResourceLoader;
   import org.jboss.seam.faces.FacesManager;
   import org.jboss.seam.faces.FacesMessages;
   import org.jboss.seam.faces.FacesPage;
  @@ -55,6 +56,7 @@
         installComponent(appContext, Validation.class);
         installComponent(appContext, Session.class);
         installComponent(appContext, ConversationPropagation.class);
  +      installComponent(appContext, ResourceLoader.class);
      }
      
      private void installComponent(Context appContext, Class clazz)
  
  
  
  1.4       +2 -7      jboss-seam/src/test/misc/org/jboss/seam/test/SeamTestTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SeamTestTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/test/misc/org/jboss/seam/test/SeamTestTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- SeamTestTest.java	13 Jul 2007 16:08:46 -0000	1.3
  +++ SeamTestTest.java	25 Jul 2007 14:40:31 -0000	1.4
  @@ -1,8 +1,5 @@
   package org.jboss.seam.test;
   
  -import javax.faces.el.MethodBinding;
  -
  -import org.jboss.seam.jsf.UnifiedELMethodBinding;
   import org.jboss.seam.mock.SeamTest;
   import org.testng.annotations.Test;
   
  @@ -37,10 +34,8 @@
            @Override
            protected void invokeApplication() throws Exception
            {
  -            MethodBinding methodBinding = new UnifiedELMethodBinding("#{action.go}", new Class[0]);
  -            Object result = methodBinding.invoke(getFacesContext(), new Object[0]);
  -            
  -            assert result instanceof String;
  +            invokeAction("#{action.go}");
  +            String result = getOutcome();
               assert "success".equals(result);
            }
         }.run();
  
  
  
  1.2       +0 -2      jboss-seam/src/test/misc/org/jboss/seam/test/TimeZoneTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TimeZoneTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/test/misc/org/jboss/seam/test/TimeZoneTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- TimeZoneTest.java	13 Jul 2007 16:08:46 -0000	1.1
  +++ TimeZoneTest.java	25 Jul 2007 14:40:31 -0000	1.2
  @@ -1,14 +1,12 @@
   package org.jboss.seam.test;
   
   import java.io.IOException;
  -import java.util.Locale;
   import java.util.TimeZone;
   
   import javax.faces.component.UIOutput;
   import javax.faces.event.ValueChangeEvent;
   
   import org.jboss.deployers.spi.DeploymentException;
  -import org.jboss.seam.international.LocaleSelector;
   import org.jboss.seam.international.TimeZoneSelector;
   import org.jboss.seam.mock.SeamTest;
   import org.testng.annotations.Test;
  
  
  



More information about the jboss-cvs-commits mailing list