Okie, super, I have my first couple of tests working !
There is a lot of refactoring to do yet, but at least, I'm not blocked
anymore :-)
Thanks Stefan, you were super helpful !
On 05/04/2021 06:42, Emmanuel Lécharny wrote:
On 04/04/2021 23:17, Emmanuel Lécharny wrote:
Hmmm, I think there must be a side effect.
The following line :
testClass.getField( "service" )...
can't return the reference of the service field, which is not present
in the LdapConnectionTest class, but is present in the
AbstractLdapTestUnit parent class. And getField() does not return
fields from super classes...
And.... I'm plain wrong :/
And all I had to do to get the test passing was to declare my
DirectoryService fields as static.
Also not declaring those fields as private because when you call a
getDeclaredField, there you don't get the inherited fields.
Thanks Stefan, it took me quite some time to understand what was wrong
in my test !
--
*Emmanuel Lécharny - CTO* 205 Promenade des Anglais – 06200 NICE
T. +33 (0)4 89 97 36 50
P. +33 (0)6 08 33 32 61
emmanuel.lecha...@busit.com https://www.busit.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org