Issue #206 has been updated by Rémy-Christophe Schermesser.

Thanks for the corrections !

But I have some comments on the tests : 
* We are using JUnit 4, so can you update your test ?
* Why are you using assertTrue and not assertEquals ?
* There is no need to catch the exceptions, you can juste throw them and JUnit 
will consider is as an error in the test.

> I code the class as a singleton not a factory, because we should not have 
> more than one instance of this class running to avoid two simultaneous calls 
> to the method getNextValue. I didn't use a static method because there is 
> some state stored.
> How would you have done this ? 

Sorry, I thought singleton and I wrote factory. I do not like the singleton 
pattern, it is very difficult to code a good one (with all the problems of 
concurrency). But, in this case, without Spring, I do not see how to do it.

> > At last, where is the unit test ? ;)
> I give you some and the ldif corresponding, but I need some help to know how 
> to tell the unit test to load the ldif before try the assert (and how to 
> empty the directory for the other test). Could you help me doing this please ?
> 

If I remember correcty, you just have to put your ldif in this file 
src/test/java/org/lsc/opends/test.ldif and it will be loaded in the OpenDS. If 
it does not work, try GrosSeb or jooooooon on irc.

Thanks !




----------------------------------------
Feature #206: Method to determine the next available digital identifier for a 
given attribute in a directory
http://tools.lsc-project.org/issues/show/206

Author: Stéfanie Duprey
Status: New
Priority: Normal
Assigned to: Sébastien Bahloul
Category: Core
Target version: 1.3 branch


Add a method to determine the next available digital identifier for a given 
attribute in a directory.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://tools.lsc-project.org/my/account
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-dev mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-dev

Reply via email to