The framework says that it can not find the bundle because it is not in your
classpath !
=> then you need to have the content-template jar to be part of your test
class path

   <dependency>
      <groupId>org.nuxeo.ecm.platform</groupId>
      <artifactId>nuxeo-platform-content-template-manager</artifactId>
      <scope>test</scope>
    </dependency>

After that tests (or at least bundle deployment) should run ok in via
sure-fire.

And to update in eclipse :

mvn -o eclipse:eclipse

+ refresh project


Tiry

On 19 October 2010 09:44, Estela Fernandez Perez <
[email protected]> wrote:

>  Hello,
>
>
>
> I deployed my contribution in my test case but I don’t know how to deploy
> the content-template-service.
>
> I have tried to do this 
> *deployBundle("org.nuxeo.ecm.platform.content.template");
> but* I obtain this error:
>
>
>
> java.lang.RuntimeException: Could not resolve bundle
> org.nuxeo.ecm.platform.content.template
>
>                 at
> org.nuxeo.runtime.test.NXRuntimeTestCase.lookupBundleUrl(NXRuntimeTestCase.java:493)
>
>                 at
> org.nuxeo.runtime.test.NXRuntimeTestCase.oldLookupBundle(NXRuntimeTestCase.java:566)
>
>                 at
> org.nuxeo.runtime.test.NXRuntimeTestCase.lookupBundle(NXRuntimeTestCase.java:561)
>
>                 at
> org.nuxeo.runtime.test.NXRuntimeTestCase.deployBundle(NXRuntimeTestCase.java:508)
>
>                 at
> seia.reg.nuxeo.document.TestRegDocument.setUp(TestRegDocument.java:18)
>
>                 at org.jmock.core.VerifyingTestCase.runBare(Unknown
> Source)
>
>                 at
> junit.framework.TestResult$1.protect(TestResult.java:110)
>
>                 at
> junit.framework.TestResult.runProtected(TestResult.java:128)
>
>                 at junit.framework.TestResult.run(TestResult.java:113)
>
>                 at junit.framework.TestCase.run(TestCase.java:124)
>
>                 at junit.framework.TestSuite.runTest(TestSuite.java:232)
>
>                 at junit.framework.TestSuite.run(TestSuite.java:227)
>
>                 at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
>
>                 at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
>
>                 at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>
>                 at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>
>                 at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>
>                 at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>
>                 at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>
>
>
> Regards,
>
> *Estela Fernández Pérez***
>
>
>
>
>
> *From:* Thierry Delprat [mailto:[email protected]]
> *Sent:* lunes, 18 de octubre de 2010 20:15
> *To:* Estela Fernandez Perez
> *Cc:* [email protected]
> *Subject:* Re: [Ecm] Problems with contenttemplate and JUnit
>
>
>
> Did you deploy the content-template-service and your contribution in your
> test case ???
>
>
>
>
>
> On 18 October 2010 15:42, Estela Fernandez Perez <
> [email protected]> wrote:
>
> Hello,
>
>
>
> I'm having some troubles writing a JUnit to test the creation of my custom
> type.
>
> I have created an initial route defined in the configuration file *
> contenttemplate-contrib.xml* and I’m trying to test the creation of a
> document of my custom type in that route. But in the JUnit test I don’t find
> the route.  I think the problem is that the contettemplate configuration not
> loaded when launching the test.
>
>
>
> My Test class extends of *SQLRepositoryTestCase *class and I try to create
> my document as follows:
>
>
>
> *“DocumentModel docModel =
> session.createDocumentModel("/default-domain/workspaces/registro-entrada","idReg","RegEntrada");“
> *
>
> * *
>
> This route is defined in the file *contenttemplate-contrib.xml.*
>
> * *
>
> Does anybody know why this might happen?
>
>
>
> Regards,
>
>
>
> *Estela Fernández*
>
>
>
>
>
>
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive
> this e-mail in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group liability cannot be triggered for the message content. Although
> the sender endeavours to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and
> will not be liable for any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial
> destinada solamente a la(s) persona(s) mencionadas anteriormente
> pueden estar protegidos por secreto profesional.
> Si usted recibe este correo electronico por error, gracias por informar
> inmediatamente al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin
> no se hace responsable por su contenido. Su contenido no constituye ningun
> compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas
> partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
> no puede garantizar nada al respecto y no sera responsable de cualesquiera
> danos que puedan resultar de una transmision de virus.
> ------------------------------------------------------------------
>
>
> _______________________________________________
> ECM mailing list
> [email protected]
> http://lists.nuxeo.com/mailman/listinfo/ecm
> To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm
>
>
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive
> this e-mail in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group liability cannot be triggered for the message content. Although
> the sender endeavours to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and
> will not be liable for any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial
> destinada solamente a la(s) persona(s) mencionadas anteriormente
> pueden estar protegidos por secreto profesional.
> Si usted recibe este correo electronico por error, gracias por informar
> inmediatamente al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin
> no se hace responsable por su contenido. Su contenido no constituye ningun
> compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas
> partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
> no puede garantizar nada al respecto y no sera responsable de cualesquiera
> danos que puedan resultar de una transmision de virus.
> ------------------------------------------------------------------
>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to