Issue #206 has been updated by Stéfanie Duprey. File NextIntAttributeValueFinderTest.java added
Rémy-Christophe Schermesser wrote: > Thanks for the corrections ! > > But I have some comments on the tests : > * We are using JUnit 4, so can you update your test ? > * 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've first done my test case as you ask me, but then I saw the other test made in the lsc-project and I rewrote my test to fit your coding style... but OK, see attachments > > > 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. But I need two different states (empty directory and full directory), and I can't put two ldif in one. We can not state the ldif to import in the test itself ? > > 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

