I have an application that uses a LDAP server, and I need to write some unit tests. I started mocking LDAP DirContext and others, but it makes too difficult for my current tests, so I thought I using an embedded LDAP server.
This link does not work: http://directory.apache.org/apacheds/1.5/42-using-apacheds-for-unit-tests.html -> Embedding ApacheDS - Conference Materials -> Code Examples (requires Maven 2.x) (SVN)
Does anyone have the code example for it or any alternative to ApacheDS?
Instead of mocking, use the in-memory directory server provided by the UnboundID LDAP SDK. This is a fully-fledged server and its use will result in realistic responses from a directory server, which will lead to more complete testing and more robust code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With