On 3/5/07, tibi <[EMAIL PROTECTED]> wrote:
and one other thing:
can this:

    protected String[] getConfigLocations() {
        return new String[] {
"classpath*:/applicationContext-resources.xml",
"classpath*:/applicationContext-dao.xml",
"classpath*:/applicationContext-service.xml",
                "/WEB-INF/applicationContext*.xml",
"/WEB-INF/security.xml" };
    }

be changed to a default convention:
a getConfigLocations in the
AbstractTransactionalDataSourceSpringContextTests which reads the web.xml?

I don't like this idea because I think it makes sense to run many of
the integration tests w/o security.xml being loaded.  It's not needed,
so there's no need to invoke the overhead. This is my opinion of
course, and I'm only one user of AppFuse. ;-)

Matt


tibi

tibi wrote:
> hi all,
>
> i'm testing and trying your appfuse with most of the time a smile on
> my face :-D
>
> here is what i found.....(or not found ;) )
>
> 1) i miss a lot off appfuse (test) 2 docs (but i know its not there
> officially so i will wait)
> 2a) cobertura is cool but the latest maven plugin (2.1) gives me all
> 100% covarege so i needed to add:
>               <version>2.0</version>
> 2b)convention over configuration i would add (especcially because the
> docs online have a bug (exludes tag is missing):
>                 <plugin>
>                   <groupId>org.codehaus.mojo</groupId>
>                   <artifactId>cobertura-maven-plugin</artifactId>
>               <version>2.0</version>
>                   <configuration>
>                     <instrumentation>
>                       <excludes>
>                           <exclude>mypackage/**/*Test.class</exclude>
>                       </excludes>
>                     </instrumentation>
>                   </configuration>
>                 </plugin>                  (but i'm not sure if the
> excluding is needed. sometimes tests come up in my reports)
>
> 3) i like jmock to easy and fast testing. but i found it difficult to
> use a test case which extends 'BaseActionTestCase' and use Jmock
> (which likes to extend 'BaseManagerMockTestCase').
> to pass this little problem i did this:
>
> =============================================================
> package nl.tibi.janneke;
>
> import org.appfuse.service.impl.BaseManagerMockTestCase;
>
> /**
> * just for extending baseamangerMocktestCase which is abstract.
> */
> public class MyBaseManagerMockTestCaseDummy extends
> BaseManagerMockTestCase {
>
> }
> ===============================================================
> package nl.tibi.janneke.action;
>
> import nl.tibi.janneke.MyBaseManagerMockTestCaseDummy;
> import nl.tibi.janneke.model.Person;
>
> import org.appfuse.service.GenericManager;
> import org.appfuse.service.impl.BaseManagerMockTestCase;
> import org.appfuse.webapp.action.BaseActionTestCase;
> import org.jmock.Mock;
>
> public class PersonActionTest extends BaseActionTestCase {
>
>   private PersonAction personAction;
>
>   public void setPersonAction(PersonAction personAction) {
>       this.personAction = personAction;
>   }
>
>   public void testSave() throws Exception {
>       BaseManagerMockTestCase testManager = new
> MyBaseManagerMockTestCaseDummy();
>       Mock mockManager = testManager.mock(GenericManager.class);
>       personAction.setPersonManager((GenericManager<Person, Long>)
> mockManager.proxy());
>
>       Person person = new Person();
>       person.setFirstName("testFirstName");
>       person.setLastName("testLastName");
>
>
> 
mockManager.expects(testManager.once()).method("save").with(testManager.eq(person));
>
>       personAction.setPerson(person);
>
>       String result = personAction.save();
>       assertEquals(result, PersonAction.FORM);
>   }
> }
> ==========================================================
>
> mayby add someclass in appfuse to overcome this??
>
>
> 4) to be able to run jetty on exploded code i needed to remove
> struts.xml as well (besides the lib):
> rm src/main/webapp/WEB-INF/classes/struts.xml
>
> i think thats it for now ;)
>
>
> ciao,
>
> tibi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to