tag:blogger.com,1999:blog-7764648486592252038.post6374575114693476102..comments2023-06-11T02:43:21.165-07:00Comments on D Dubbya: Mocking LDAP Servers for JUnitDustin Wilhelmihttp://www.blogger.com/profile/16750619001190081365noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-7764648486592252038.post-41656882526003260972011-07-11T09:31:06.834-07:002011-07-11T09:31:06.834-07:00Thanks for your post, and I'm glad you found t...Thanks for your post, and I'm glad you found the in-memory directory server useful.<br /><br />A couple of comments on your post:<br /><br />- Thanks for pointing out the discrepancy between initializeFromLDIF and importFromLDIF. The method name was originally initializeFromLDIF, but I changed it before releasing it. I have committed a change to use the correct name in the documentation.<br /><br />- The comment about "dc=com" not being acceptable is because you specified "dc=example,dc=com" as the base DN. If you had specified "dc=com" as the base DN, then you would have been allowed to include that entry.<br /><br />- If you have the desired schema in a file, then you could use one of the Schema.getSchema() methods to load it, and it will do all the necessary work. If you have an InputStream, then you could have used LDIFReader to read the entry from that stream. I can look at adding static methods in the LDIFReader class to make it more convenient to read entries from LDIF, like one that takes a path or input stream and returns a List of Entry objects (assuming that your LDIF is small enough that you don't have to worry about running out of memory). I have also just added new static LDIFReader.readEntries methods that can be used to read entries from an LDIF file or input stream into a list.<br /><br />- If you have any other problems or suggestions for improvement, feel free to send them to ldapsdk-support at unboundid.com or use the mailing lists or discussion forum at http://sourceforge.net/projects/ldap-sdk/.<br /><br /><br />Neil Wilson<br />Primary LDAP SDK Developer<br />UnboundID Corp.Neil Wilsonhttp://www.unboundid.com/noreply@blogger.com