简体   繁体   中英

Using apacheDS for unit test

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.

see also

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM