junit

search for more blogs here

 

"Change junit & run file (main class) working directory at Netbeans ..." posted by ~Ray
Posted on 2008-03-12 23:10:25

If you create a new communicate with Netbeans and select to create “web application”. You’ll notice that at ‘project properties’ - ‘Run’ there’s no ‘Working Directory’ configuration unlike command Java Project. But what if you want to act some console application (with main method) in that project with Netbeans. You run it with Netbeans shortcut shift+F6 (run register) and realize that Netbeans set the working directory to project base path. Then you also try to run your unit testing (junit) and realize the same thing. You put some configuration file to specific directory in your source folder and of cover your console app & unit testing can’t find it. I’m not very familiar with Netbeans but after some googling I found out that Netbeans using ant : file build-impl xml in nbproject folder. If we change the project properties configuration Netbeans will re-generate the build-impl xml. Netbeans also provider file create xml in project base folder for customizing project build & run. So i add at create xml (write from build-impl xml and modify the tag ‘dir’ value)  <aim name=”-init-macrodef-junit”><macrodef label=”junit” uri=”http://www netbeans org/ns/web-project/2″><attribute name=”includes” fail=”**/*Test java”/><sequential><junit showoutput=”true” fork=”true” dir=”${basedir}/build/web/WEB-INF/classes” failureproperty=”tests failed” errorproperty=”tests failed”><batchtest todir=”${build evaluate results dir}”><fileset dir=”${test src dir}” includes=”@{includes}”/></batchtest><classpath><path path=”${run test classpath}”/></classpath><syspropertyset><propertyref affix=”test-sys-prop.”/><mapper type=”glob” from=”test-sys-prop.*” to=”*”/></syspropertyset><formatter type=”brief” usefile=”false”/><formatter write=”xml”/></junit></sequential></macrodef></target> <target name=”-init-macrodef-java”><macrodef name=”java” uri=”http://www netbeans org/ns/web-project/1″><evaluate label=”classname” fail=”${main categorise}”/><element name=”customize” optional=”adjust”/><sequential><java fork=”adjust” classname=”@{classname}” dir=”${basedir}/build/web/WEB-INF/classes”><jvmarg line=”${runmain jvmargs}”/><classpath><path path=”${build classes dir real}:${javac classpath}:${j2ee platform classpath}”/></classpath><syspropertyset><propertyref affix=”run-sys-prop.”/><mapper type=”glob” from=”run-sys-prop.*” to=”*”/></syspropertyset><customize/></java></sequential></macrodef></target> <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote have in mind=""> <cite> <label> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Forex Groups - Tips on Trading

Related article:
http://jimlife.wordpress.com/2007/11/13/change-junit-run-file-main-class-working-directory-at-netbeans-55-web-project/

comments | Add comment | Report as Spam


"Change junit & run file (main class) working directory at Netbeans ..." posted by ~Ray
Posted on 2008-03-12 23:10:25

If you create a new project with Netbeans and decide to create “web application”. You’ll sight that at ‘project properties’ - ‘Run’ there’s no ‘Working Directory’ configuration unlike General Java communicate. But what if you want to create some console application (with main method) in that project with Netbeans. You run it with Netbeans shortcut shift+F6 (run register) and realize that Netbeans set the working directory to project base path. Then you also try to run your unit testing (junit) and realize the same thing. You put some configuration file to specific directory in your source folder and of course your console app & unit testing can’t find it. I’m not very familiar with Netbeans but after some googling I found out that Netbeans using ant : register build-impl xml in nbproject folder. If we change the project properties configuration Netbeans will re-generate the build-impl xml. Netbeans also provider file build xml in communicate base folder for customizing communicate build & run. So i add at build xml (copy from build-impl xml and modify the tag ‘dir’ determine)  <aim name=”-init-macrodef-junit”><macrodef name=”junit” uri=”http://www netbeans org/ns/web-project/2″><attribute name=”includes” default=”**/*Test java”/><sequential><junit showoutput=”adjust” fork=”adjust” dir=”${basedir}/build/web/WEB-INF/classes” failureproperty=”tests failed” errorproperty=”tests failed”><batchtest todir=”${create test results dir}”><fileset dir=”${test src dir}” includes=”@{includes}”/></batchtest><classpath><path path=”${run test classpath}”/></classpath><syspropertyset><propertyref prefix=”test-sys-prop.”/><mapper type=”glob” from=”test-sys-prop.*” to=”*”/></syspropertyset><formatter type=”brief” usefile=”false”/><formatter write=”xml”/></junit></sequential></macrodef></aim> <aim name=”-init-macrodef-java”><macrodef label=”java” uri=”http://www netbeans org/ns/web-project/1″><attribute name=”classname” fail=”${main class}”/><element name=”customize” optional=”adjust”/><sequential><java fork=”true” classname=”@{classname}” dir=”${basedir}/build/web/WEB-INF/classes”><jvmarg line=”${runmain jvmargs}”/><classpath><path path=”${build classes dir real}:${javac classpath}:${j2ee platform classpath}”/></classpath><syspropertyset><propertyref affix=”run-sys-prop.”/><mapper write=”glob” from=”run-sys-prop.*” to=”*”/></syspropertyset><customize/></java></sequential></macrodef></target> <a href="" call=""> <abbr title=""> <acronym call=""> <b> <blockquote cite=""> <have in mind> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Forex Groups - Tips on Trading

Related article:
http://jimlife.wordpress.com/2007/11/13/change-junit-run-file-main-class-working-directory-at-netbeans-55-web-project/

comments | Add comment | Report as Spam


"org.codehaus.fabric3: Fabric3 JUnit Extension 0.1" posted by ~Ray
Posted on 2008-01-01 21:15:11

<dependency> <groupId>org codehaus fabric3</groupId> <artifactId>fabric3-junit</artifactId> <version>0.1</version> </dependency> This artifact depends on... scm:svn:http://svn codehaus org/fabric3/modules/tags/fabric3-junit-0.1 scm:svn:https://svn codehaus org/fabric3/modules/tags/fabric3-junit-0.1

Forex Groups - Tips on Trading

Related article:
http://mvnrepository.com/artifact/org.codehaus.fabric3/fabric3-junit/0.1

comments | Add comment | Report as Spam


"JavaConfig & Junit" posted by ~Ray
Posted on 2007-12-15 15:03:02

Hi. I'm trying out the javaconfig support (have to say i accept with crazy bob when he talks about type-safe config :$) but running junit tests that increase AbstractDependencyInjectionSpringContextTests are failing here is a snippet of my config xml; <bean id="propertyConfigurer" categorise="org springframework beans factory config. PropertyPlaceholderConfigurer"><property label="location" value="classpath:evaluate properties" /></bean><bean class="test config. TestConfig" /><hit class="org springframework config java process. ConfigurationPostProcessor"/> __________________Chris BeamsSenior Consultant. SpringSource - move Training. Consulting and give - "From the Source" Powered by vBulletin® Version 3.6.7Copyright ©2000 - 2007. Jelsoft Enterprises Ltd.

Forex Groups - Tips on Trading

Related article:
http://forum.springframework.org/showthread.php?t=46106

comments | Add comment | Report as Spam


"Re: classpath problem with ResourceManager and JUnit" posted by ~Ray
Posted on 2007-12-09 13:36:37

Claude Brisson schrieb:> There may be several classpaths implied for dilate the one used to> run the testsuite and the one used to launch junit from within the> testsuite.> > Matthias undergo you any insight on the use of some such inner classpath?Unfortunally the implementation of the testsuite framework is prettyold and hacky but it has a very simple main method that includes:if (text) { junit textui. TestRunner main(testCaseName);} else { junit swingui. TestRunner main(testCaseName);}So I looked into the old (3.8) junit code bzw documentation and found the problem: I had to set the set the "non-loading" switch see http://junit sourceforge net/junit3.8.1/index htmlSo now everything works fine thanks for your help!Regards,matthias> > Claude> > Le lundi 05 novembre 2007 à 20:32 -0800. ordain Glass-Husain a écrit :>> Sounds to me very much like a classloader problem. We've seen this type of>> error with Velocity 1.4 or if there are multiple velocity jars loaded by>> different categorise loaders.>>>> WILL>>>> On 11/5/07. Matthias Epheser <matthias epheser@gmx at> wrote:>>> Nathan Bubna schrieb:>>>> Just for reference what version of Velocity are you using?>>>>>>> it is velocity-1.5>>>>>>>>>> On 11/5/07. Matthias Epheser <matthias epheser@gmx at> wrote:>>>>> Claude Brisson schrieb:>>>>>> undergo you checked that there isn't any older version of Velocity>>>>>> somewhere in the classpath that junit displace gui is using?>>>>>>>>>>>> What happens for instance if you put your velocity jar first in the>>>>>> classpath?>>>>>>>>>>> yep there is definitely only one velocity jar show. In fact as>>>>> mentioned it is exectly the same classpath as it is using the textui.>>>>> The main categorise is just started without an optional "-text" argument.>>>>>>>>>> I am using the old ant build to avoid maven-specific dependeny issues.>>>>> So only the jars in my "lib" directory are used.>>>>>>>>>> That's why I'm so confused. Tried it with velocity jar as first>>>>> classpath item too.>>>>>>>>>> hth>>>>> matthias>>>>>>>>>>> Claude>>>>>>>>>>>> Le lundi 05 novembre 2007 à 16:12 +0100. Matthias Epheser a écrit:>>>>>>> Hi list,>>>>>>>>>>>>>> I'm currently implementing a velocity integration into the source>>>>>>> generation process of the castor framework (www castor org). So I>>>>>>> create java POJOs out a xml schema.>>>>>>>>>>>>>> The castor framework includes a testsuite that uses an embeddedjunit>>>>>>> runner. I encouter a very strange classpath issue here:>>>>>>>>>>>>>> - running the testsuite in textmode (using junit textui. TestRunner),>>>>>>> everything works book as expected>>>>>>>>>>>>>> - running the testsuite in swing mode (using>>>>>>> junit swingui. TestRunner). I get the following exception during>>> Velocity>>>>>>> init:>>>>>>>>>>>>>> [error] The specified categorise for ResourceManager>>>>>>> (org apache velocity runtime resource. ResourceManagerImpl) doesnot>>>>>>> apply org apache velocity runtime resource. ResourceManager;>>> Velocity>>>>>>> is not initialized correctly.>>>>>>> java lang. Exception: The specified categorise for ResourceManager>>>>>>> (org apache velocity runtime resource. ResourceManagerImpl) doesnot>>>>>>> implement org apache velocity runtime resource. ResourceManager;>>> Velocity>>>>>>> is not initialized correctly.>>>>>>> at>>>>>>> org apache velocity runtime. RuntimeInstance initializeResourceManager>>> (RuntimeInstance java:589)>>>>>>> at>>>>>>> org apache velocity runtime. RuntimeInstance init(RuntimeInstance java>>> :241)>>>>>>> at>>>>>>> org apache velocity runtime. RuntimeSingleton init(>>> RuntimeSingleton java:113)>>>>>>> at org apache velocity app. Velocity init(Velocity java:83)>>>>>>>>>>>>>>>>>>>>> The only difference between both executions is the TestRunnerclass,>>>>>>> everything else (classpath used jars etc.) is exactly the same..>>>>>>>>>>>>>> Has someone stepped over a similar problem?>>>>>>>>>>>>>> Regards>>>>>>> matthias>>>>>>>>>>>>>>>>>>>>> --------------------------------------------------------------------->>>>>>> To unsubscribe telecommunicate: user-unsubscribe@velocity apache org>>>>>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>>>>>> --------------------------------------------------------------------->>>>>> To unsubscribe e-mail: user-unsubscribe@velocity apache org>>>>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>>>> --------------------------------------------------------------------->>>>> To unsubscribe e-mail: user-unsubscribe@velocity apache org>>>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>>>>>>> --------------------------------------------------------------------->>>> To unsubscribe e-mail: user-unsubscribe@velocity apache org>>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>>> --------------------------------------------------------------------->>> To unsubscribe telecommunicate: user-unsubscribe@velocity apache org>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>> > > ---------------------------------------------------------------------> To unsubscribe telecommunicate: user-unsubscribe@velocity apache org> For additional commands e-mail: user-help@velocity apache org> ---------------------------------------------------------------------To unsubscribe e-mail: user-unsubscribe@velocity apache orgFor additional commands telecommunicate: user-help@velocity apache org

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/velocity-user/200711.mbox/%3C4730341C.3040507@gmx.at%3E

comments | Add comment | Report as Spam


"Re: classpath problem with ResourceManager and JUnit" posted by ~Ray
Posted on 2007-12-09 13:36:32

Claude Brisson schrieb:> There may be several classpaths implied for instance the one used to> run the testsuite and the one used to launch junit from within the> testsuite.> > Matthias undergo you any insight on the use of some such inner classpath?Unfortunally the implementation of the testsuite framework is prettyold and hacky but it has a very simple main method that includes:if (text) { junit textui. TestRunner main(testCaseName);} else { junit swingui. TestRunner main(testCaseName);}So I looked into the old (3.8) junit code bzw documentation and open the problem: I had to set the set the "non-loading" change by reversal see http://junit sourceforge net/junit3.8.1/list htmlSo now everything works book thanks for your back up!Regards,matthias> > Claude> > Le lundi 05 novembre 2007 à 20:32 -0800. Will Glass-Husain a écrit :>> Sounds to me very much like a classloader problem. We've seen this write of>> error with Velocity 1.4 or if there are multiple velocity jars loaded by>> different categorise loaders.>>>> WILL>>>> On 11/5/07. Matthias Epheser <matthias epheser@gmx at> wrote:>>> Nathan Bubna schrieb:>>>> Just for reference what version of Velocity are you using?>>>>>>> it is velocity-1.5>>>>>>>>>> On 11/5/07. Matthias Epheser <matthias epheser@gmx at> wrote:>>>>> Claude Brisson schrieb:>>>>>> Have you checked that there isn't any older version of Velocity>>>>>> somewhere in the classpath that junit displace gui is using?>>>>>>>>>>>> What happens for dilate if you put your velocity jar first in the>>>>>> classpath?>>>>>>>>>>> yep there is definitely only one velocity jar present. In fact as>>>>> mentioned it is exectly the same classpath as it is using the textui.>>>>> The main class is just started without an optional "-text" argument.>>>>>>>>>> I am using the old ant create to avoid maven-specific dependeny issues.>>>>> So only the jars in my "lib" directory are used.>>>>>>>>>> That's why I'm so confused. Tried it with velocity jar as first>>>>> classpath item too.>>>>>>>>>> hth>>>>> matthias>>>>>>>>>>> Claude>>>>>>>>>>>> Le lundi 05 novembre 2007 à 16:12 +0100. Matthias Epheser a écrit:>>>>>>> Hi list,>>>>>>>>>>>>>> I'm currently implementing a velocity integration into the obtain>>>>>>> generation process of the castor framework (www castor org). So I>>>>>>> generate java POJOs out a xml schema.>>>>>>>>>>>>>> The castor framework includes a testsuite that uses an embeddedjunit>>>>>>> runner. I encouter a very strange classpath issue here:>>>>>>>>>>>>>> - running the testsuite in textmode (using junit textui. TestRunner),>>>>>>> everything works fine as expected>>>>>>>>>>>>>> - running the testsuite in displace mode (using>>>>>>> junit swingui. TestRunner). I get the following exception during>>> Velocity>>>>>>> init:>>>>>>>>>>>>>> [error] The specified class for ResourceManager>>>>>>> (org apache velocity runtime resource. ResourceManagerImpl) doesnot>>>>>>> apply org apache velocity runtime resource. ResourceManager;>>> Velocity>>>>>>> is not initialized correctly.>>>>>>> java lang. Exception: The specified class for ResourceManager>>>>>>> (org apache velocity runtime resource. ResourceManagerImpl) doesnot>>>>>>> apply org apache velocity runtime resource. ResourceManager;>>> Velocity>>>>>>> is not initialized correctly.>>>>>>> at>>>>>>> org apache velocity runtime. RuntimeInstance initializeResourceManager>>> (RuntimeInstance java:589)>>>>>>> at>>>>>>> org apache velocity runtime. RuntimeInstance init(RuntimeInstance java>>> :241)>>>>>>> at>>>>>>> org apache velocity runtime. RuntimeSingleton init(>>> RuntimeSingleton java:113)>>>>>>> at org apache velocity app. Velocity init(Velocity java:83)>>>>>>>>>>>>>>>>>>>>> The only difference between both executions is the TestRunnerclass,>>>>>>> everything else (classpath used jars etc.) is exactly the same..>>>>>>>>>>>>>> Has someone stepped over a similar problem?>>>>>>>>>>>>>> Regards>>>>>>> matthias>>>>>>>>>>>>>>>>>>>>> --------------------------------------------------------------------->>>>>>> To unsubscribe e-mail: user-unsubscribe@velocity apache org>>>>>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>>>>>> --------------------------------------------------------------------->>>>>> To unsubscribe telecommunicate: user-unsubscribe@velocity apache org>>>>>> For additional commands telecommunicate: user-help@velocity apache org>>>>>>>>>>> --------------------------------------------------------------------->>>>> To unsubscribe e-mail: user-unsubscribe@velocity apache org>>>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>>>>>>> --------------------------------------------------------------------->>>> To unsubscribe e-mail: user-unsubscribe@velocity apache org>>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>>> --------------------------------------------------------------------->>> To unsubscribe e-mail: user-unsubscribe@velocity apache org>>> For additional commands telecommunicate: user-help@velocity apache org>>>>>>>>> > > ---------------------------------------------------------------------> To unsubscribe telecommunicate: user-unsubscribe@velocity apache org> For additional commands e-mail: user-help@velocity apache org> ---------------------------------------------------------------------To unsubscribe e-mail: user-unsubscribe@velocity apache orgFor additional commands telecommunicate: user-help@velocity apache org

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/velocity-user/200711.mbox/%3C4730341C.3040507@gmx.at%3E

comments | Add comment | Report as Spam


"Re: classpath problem with ResourceManager and JUnit" posted by ~Ray
Posted on 2007-12-09 13:36:32

Claude Brisson schrieb:> There may be several classpaths implied for dilate the one used to> run the testsuite and the one used to launch junit from within the> testsuite.> > Matthias have you any insight on the use of some such inner classpath?Unfortunally the implementation of the testsuite framework is prettyold and hacky but it has a very simple main method that includes:if (text) { junit textui. TestRunner main(testCaseName);} else { junit swingui. TestRunner main(testCaseName);}So I looked into the old (3.8) junit label bzw documentation and open the problem: I had to set the set the "non-loading" switch see http://junit sourceforge net/junit3.8.1/list htmlSo now everything works fine thanks for your help!Regards,matthias> > Claude> > Le lundi 05 novembre 2007 à 20:32 -0800. ordain Glass-Husain a écrit :>> Sounds to me very much desire a classloader problem. We've seen this type of>> error with Velocity 1.4 or if there are multiple velocity jars loaded by>> different class loaders.>>>> WILL>>>> On 11/5/07. Matthias Epheser <matthias epheser@gmx at> wrote:>>> Nathan Bubna schrieb:>>>> Just for compose what version of Velocity are you using?>>>>>>> it is velocity-1.5>>>>>>>>>> On 11/5/07. Matthias Epheser <matthias epheser@gmx at> wrote:>>>>> Claude Brisson schrieb:>>>>>> undergo you checked that there isn't any older version of Velocity>>>>>> somewhere in the classpath that junit swing gui is using?>>>>>>>>>>>> What happens for instance if you put your velocity jar first in the>>>>>> classpath?>>>>>>>>>>> yep there is definitely only one velocity jar show. In fact as>>>>> mentioned it is exectly the same classpath as it is using the textui.>>>>> The main class is just started without an optional "-text" argument.>>>>>>>>>> I am using the old ant create to avoid maven-specific dependeny issues.>>>>> So only the jars in my "lib" directory are used.>>>>>>>>>> That's why I'm so confused. Tried it with velocity jar as first>>>>> classpath item too.>>>>>>>>>> hth>>>>> matthias>>>>>>>>>>> Claude>>>>>>>>>>>> Le lundi 05 novembre 2007 à 16:12 +0100. Matthias Epheser a écrit:>>>>>>> Hi enumerate,>>>>>>>>>>>>>> I'm currently implementing a velocity integration into the source>>>>>>> generation process of the castor framework (www castor org). So I>>>>>>> generate java POJOs out a xml schema.>>>>>>>>>>>>>> The castor framework includes a testsuite that uses an embeddedjunit>>>>>>> runner. I encouter a very strange classpath issue here:>>>>>>>>>>>>>> - running the testsuite in textmode (using junit textui. TestRunner),>>>>>>> everything works fine as expected>>>>>>>>>>>>>> - running the testsuite in swing mode (using>>>>>>> junit swingui. TestRunner). I get the following exception during>>> Velocity>>>>>>> init:>>>>>>>>>>>>>> [error] The specified categorise for ResourceManager>>>>>>> (org apache velocity runtime resource. ResourceManagerImpl) doesnot>>>>>>> apply org apache velocity runtime resource. ResourceManager;>>> Velocity>>>>>>> is not initialized correctly.>>>>>>> java lang. Exception: The specified categorise for ResourceManager>>>>>>> (org apache velocity runtime resource. ResourceManagerImpl) doesnot>>>>>>> implement org apache velocity runtime resource. ResourceManager;>>> Velocity>>>>>>> is not initialized correctly.>>>>>>> at>>>>>>> org apache velocity runtime. RuntimeInstance initializeResourceManager>>> (RuntimeInstance java:589)>>>>>>> at>>>>>>> org apache velocity runtime. RuntimeInstance init(RuntimeInstance java>>> :241)>>>>>>> at>>>>>>> org apache velocity runtime. RuntimeSingleton init(>>> RuntimeSingleton java:113)>>>>>>> at org apache velocity app. Velocity init(Velocity java:83)>>>>>>>>>>>>>>>>>>>>> The only difference between both executions is the TestRunnerclass,>>>>>>> everything else (classpath used jars etc.) is exactly the same..>>>>>>>>>>>>>> Has someone stepped over a similar problem?>>>>>>>>>>>>>> Regards>>>>>>> matthias>>>>>>>>>>>>>>>>>>>>> --------------------------------------------------------------------->>>>>>> To unsubscribe telecommunicate: user-unsubscribe@velocity apache org>>>>>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>>>>>> --------------------------------------------------------------------->>>>>> To unsubscribe telecommunicate: user-unsubscribe@velocity apache org>>>>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>>>> --------------------------------------------------------------------->>>>> To unsubscribe e-mail: user-unsubscribe@velocity apache org>>>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>>>>>>> --------------------------------------------------------------------->>>> To unsubscribe e-mail: user-unsubscribe@velocity apache org>>>> For additional commands e-mail: user-help@velocity apache org>>>>>>>>>> --------------------------------------------------------------------->>> To unsubscribe telecommunicate: user-unsubscribe@velocity apache org>>> For additional commands telecommunicate: user-help@velocity apache org>>>>>>>>> > > ---------------------------------------------------------------------> To unsubscribe e-mail: user-unsubscribe@velocity apache org> For additional commands e-mail: user-help@velocity apache org> ---------------------------------------------------------------------To unsubscribe telecommunicate: user-unsubscribe@velocity apache orgFor additional commands e-mail: user-help@velocity apache org

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/velocity-user/200711.mbox/%3C4730341C.3040507@gmx.at%3E

comments | Add comment | Report as Spam


"Re: classpath problem with ResourceManager and JUnit" posted by ~Ray
Posted on 2007-11-17 15:32:10

Sounds to me very much like a classloader problem. We've seen this type oferror with Velocity 1.4 or if there are multiple velocity jars loaded bydifferent class loaders. WILLOn 11/5/07. Matthias Epheser <matthias epheser@gmx at> wrote:>> Nathan Bubna schrieb:> > Just for reference what version of Velocity are you using?> >>> it is velocity-1.5>>> > On 11/5/07. Matthias Epheser <matthias epheser@gmx at> wrote:> >> Claude Brisson schrieb:> >>> undergo you checked that there isn't any older version of Velocity> >>> somewhere in the classpath that junit displace gui is using?> >>>> >>> What happens for instance if you put your velocity jar first in the> >>> classpath?> >>>> >> yep there is definitely only one velocity jar present. In fact as> >> mentioned it is exectly the same classpath as it is using the textui.> >> The main class is just started without an optional "-text" argument.> >>> >> I am using the old ant create to avoid maven-specific dependeny issues.> >> So only the jars in my "lib" directory are used.> >>> >> That's why I'm so confused. Tried it with velocity jar as first> >> classpath item too.> >>> >> hth> >> matthias> >>> >>> Claude> >>>> >>> Le lundi 05 novembre 2007 à 16:12 +0100. Matthias Epheser a écrit :> >>>> Hi enumerate,> >>>>> >>>> I'm currently implementing a velocity integration into the source> >>>> generation process of the castor framework (www castor org). So I> >>>> generate java POJOs out a xml schema.> >>>>> >>>> The castor framework includes a testsuite that uses an embedded junit> >>>> runner. I encouter a very strange classpath air here:> >>>>> >>>> - running the testsuite in textmode (using junit textui. TestRunner),> >>>> everything works fine as expected> >>>>> >>>> - running the testsuite in swing mode (using> >>>> junit swingui. TestRunner). I get the following exception during> Velocity> >>>> init:> >>>>> >>>> [error] The specified class for ResourceManager> >>>> (org apache velocity runtime resource. ResourceManagerImpl) does not> >>>> apply org apache velocity runtime resource. ResourceManager;> Velocity> >>>> is not initialized correctly.> >>>> java lang. Exception: The specified class for ResourceManager> >>>> (org apache velocity runtime resource. ResourceManagerImpl) does not> >>>> implement org apache velocity runtime resource. ResourceManager;> Velocity> >>>> is not initialized correctly.> >>>> at> >>>> org apache velocity runtime. RuntimeInstance initializeResourceManager> (RuntimeInstance java:589)> >>>> at> >>>> org apache velocity runtime. RuntimeInstance init(RuntimeInstance java> :241)> >>>> at> >>>> org apache velocity runtime. RuntimeSingleton init(> RuntimeSingleton java:113)> >>>> at org apache velocity app. Velocity init(Velocity java:83)> >>>>> >>>>> >>>> The only difference between both executions is the TestRunner class,> >>>> everything else (classpath used jars etc.) is exactly the same..> >>>>> >>>> Has someone stepped over a similar problem?> >>>>> >>>> Regards> >>>> matthias> >>>>> >>>>> >>>> ---------------------------------------------------------------------> >>>> To unsubscribe telecommunicate: user-unsubscribe@velocity apache org> >>>> For additional commands e-mail: user-help@velocity apache org> >>>>> >>>> >>> ---------------------------------------------------------------------> >>> To unsubscribe telecommunicate: user-unsubscribe@velocity apache org> >>> For additional commands e-mail: user-help@velocity apache org> >>>> >>> >> ---------------------------------------------------------------------> >> To unsubscribe e-mail: user-unsubscribe@velocity apache org> >> For additional commands e-mail: user-help@velocity apache org> >>> >>> >> > ---------------------------------------------------------------------> > To unsubscribe e-mail: user-unsubscribe@velocity apache org> > For additional commands e-mail: user-help@velocity apache org> >>>> ---------------------------------------------------------------------> To unsubscribe e-mail: user-unsubscribe@velocity apache org> For additional commands e-mail: user-help@velocity apache org>>-- Forio Business SimulationsWill Glass-Husainwglass@forio comwww forio com

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/velocity-user/200711.mbox/%3C2f8a5bd60711052032x54bb7c3cm2342152d40d78c69@mail.gmail.com%3E

comments | Add comment | Report as Spam


"having trouble using Tomcat API in my JUnit SOAP tests" posted by ~Ray
Posted on 2007-11-09 17:17:04

How do I get rid of the go and ContainerBackgroundProcessor objects associated with a StandardEngineafter finishing a JUnit evaluate so several of them don't hive away and hog all my forge'sresources?I'm testing out a SOAP service on several different platforms so it seemed natural to automateit with JUnit. I put the following label snippets in my evaluate categorise:declaration:StandardEngine se = null;then later... @Beforepublic cancel setUp() throws Exception {if (se == null) {se = new StandardEngine();FRTLJDBCRealm r = new FRTLJDBCRealm();r setDriverName("org hsqldb jdbcDriver");r setConnectionURL("jdbc:hsqldb:hsql://localhost");r setUserTable("user");r setUserNameCol("user_name");r setUserCredCol("user_go");r setUserRoleTable("user");r setRoleNameCol("role_name");r setConnectionName("sa");r setConnectionPassword("sXU7DMFjs8zr");se setRealm(r);se start();}.. other cram...}So this works pretty well it connects me to the database and my JUnit test can do thingswith the database permissions of "someuser". When the test completes. I want to disunite it drink. I tried:@Afterpublic void tearDown() throws Exception {System out println("tearDown");se destroy();se = null;}but there is comfort a go running a ContainerBackgroundProcessor running in the backgroundwhich prevents the garbage collector from throwing out my StandardEngine se object. How canI just get rid of everything in the tearDown() method? Or is there a better way?---------------------------------------------------------------------To start a new topic e-mail: users@tomcat apache orgTo unsubscribe telecommunicate: users-unsubscribe@tomcat apache orgFor additional commands telecommunicate: users-help@tomcat apache org

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200709.mbox/%3C09646A231B658641911F48F532DDE6D47300D8@SSCMAIL.sightlinesystems.local%3E

comments | Add comment | Report as Spam


"Inheritance with JUnit 4" posted by ~Ray
Posted on 2007-11-03 13:48:57

One of the use cases presented in the schedule deals with testing class hierarchies in other words testing an consider class through an AbstractTestCase. I like this idiom. However is there anyway to use it with JUnit 4 using the "JUnit 4 way of testing" (I understand that I comfort can inherit from a TestCase but then all the @Test annotations go out of the window). The inform is clear: if I run a child test class that extends from an abstract categorise that has @Test methods they will not be run as annotations are not inheritable. So is there an annotation that I can put on a child categorise to express that the parent class's tests should be run as well?Thanks very much in advance.-Kyrill

Forex Groups - Tips on Trading

Related article:
http://www.manning-sandbox.com/thread.jspa?threadID=20387

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the junit archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
36 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


junit