Pierre,
no Ant integration, I just run it as a test case within eclipse. I've also
run it as a Java application with the same result.
It has to be something very simple - as the test case couldnt be simplier!
thanks,
Dean
>From: "Pierre Goupil" <goupilpierre@...>
>Reply-To: jdepend@yahoogroups.com
>To: jdepend@yahoogroups.com
>Subject: Re: [jdepend] Basic jDpend test case failing
>Date: Thu, 9 Nov 2006 22:00:23 +0100
>
>Hi there !
>
>Just to be sure : do you launch all that stuff via Eclipse's Ant
>integration
>?
>
>
>Pierre
>
>
>
>
>2006/11/9, john brian <johnbrianaus@...>:
>>
>> Hi,
>>
>>I have exercised a basic jDepends testcase using JDepends 2.9.1, eclipse
>>3.2
>>and JDK5, however the testcase fails -- and despite the simplicity of my
>>example I cant work it out. Any feedback is appreciated!!
>>
>>My 'project' to analyze is very simple:
>>
>>package a;
>>import b.B;
>>public class A {
>>B b = new B();
>>}
>>
>>package b;
>>public class B {
>>}
>>
>>My junit test is pretty simple too being:
>>
>>public class TestJDepend extends TestCase {
>>private JDepend jDepend;
>>
>>public TestJDepend() {
>>}
>>
>>protected void setUp() throws Exception {
>>jDepend = new JDepend();
>>jDepend.addDirectory("bin");
>>}
>>
>>public void testPackageDependencies() {
>>DependencyConstraint constraint = new DependencyConstraint();
>>JavaPackage a = constraint.addPackage("a");
>>assertNotNull(a);
>>JavaPackage b = constraint.addPackage("b");
>>assertNotNull(b);
>>a.dependsUpon(b);
>>jDepend.analyze();
>>assertEquals("Package dependency violation", true,
>>jDepend.dependencyMatch(constraint));
>>}
>>
>>}
>>
>>where the classes are below the 'bin' package. However running this
>>results
>>in a:
>>
>>Time: 0.047
>>There was 1 failure:
>>1)
>>testPackageDependencies(TestJDepend)junit.framework.AssertionFailedError:
>>Package dependency violation expected:<true> but was:<false>
>>at TestJDepend.testPackageDependencies(TestJDepend.java:26)
>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>at TestJDepend.main(TestJDepend.java:29)
>>
>>FAILURES!!!
>>Tests run: 1, Failures: 1, Errors: 0
>>
>>any ideas?
>>
>>__________________________________________________________
>>Use your PC to make calls at very low rates
>>https://voiceoam.pcs.v2s.live.com/partnerredirect.aspx
>>
>>
>>
>
>
>
>--
>"L'une des raisons pour lesquelles la vie est complexe
>C'est qu'elle a une partie réelle et une partie imaginaire."
_________________________________________________________________
Try Search Survival Kits: Fix up your home and better handle your cash with
Live Search!
http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=en-US\
&source=hmtagline