Re: [Patsystem-users] constructors as pat.transactions
Brought to you by:
nthx
|
From: Tomasz N. <Tom...@ii...> - 2005-05-12 10:48:01
|
On Wed, May 11, 2005 at 10:42:20PM -0700, Chris wrote:
> > Ciapek, please re-run your test cases with M1-05 on
> > Windows and report
> > results here, if you may. Thanks!
>
> I just did that (Windows), but it looks worse than
> before:
> Even the simple constructor Register() doesn't go
> through:
>
> java.lang.NoSuchMethodException: getSize
^^^
So this above was due to old libs, right? ;)
>
> ciapek
build.xml: (it isn't necessary, but for safety I've changed it)
<target name="test" description="run tests" depends="clean, compile">
^^^^^
sources/register/tests/RegisterTest.java:
public void testConstructorGivenEntries() {
entries = new ArrayList();
entries.add(sampleEntry);
register=new Register((ArrayList)entries);
assertEquals(1,register.getNumberOfEntries());
}
public void testConstructorGivenEmptyEntries()
{
register = new Register(new ArrayList());
assertEquals(0,register.getNumberOfEntries());
}
One has to execute Pat.unload(), before every ROOT constructor.
So in this case 'Pat.unload()' exists inside 'setUp()', what makes it
the same.
So, you have to split your test into two. They test different things
anyway, right?
Take care,
t.
PS. I'll make 'new ROOT(..) triggers Pat.unload()' default behaviour
in next major release.
--
_i______'simplicity_is_the_key'__________tomasz_nazar
_ii____'i_am_concern_oriented'__________________iiuwr
_iii__'patsystem.sf.net'___________________linux_user
_Heaven_&_Fellows,_PPP______________________prevayler
|