[Mono-devel-list] [Mono-devel-list][Mono-hackers-list] Tests for DirectoryServices
Sébastien Pouliot
spouliot at videotron.ca
Thu Mar 17 07:51:10 EST 2005
Hello Boris,
Nice tests :-)
I would suggest a few things...
1. Network tests generally takes a long time to execute. Such (or most) test
in other assemblies have been given a
[Category ("InetAccess")]
either on the [Test]ed method or on the class (the [TestFixture]) if all
tests requires network access.
2. Hardcoding the LDAP server seems a bad idea as it will requires anyone
using the tests to make local modifications to many source files.
What about keeping the server name in an environment variable ? e.g.
MONO_LDAP_TEST_SERVER ?
3. Another advantage of using an environment variable is that it would be
possible to ignore all the tests (or some of them) if the environment
variable isn't present. I'm doing something similar for the CAS tests - i.e.
if the security manager is not enabled then all CAS tests are ignore.
This can be put the [SetUp] or [TestFixtureSetUp]
LDAPServer = Environment.GetVariable ("MONO_LDAP_TEST_SERVER");
if (LDAPServer == null) {
Assert.Ignore ("No LDAP test server configured with
MONO_LDAP_TEST_SERVER");
return;
}
Thanks,
Sebastien Pouliot
home: spouliot at videotron.ca
blog: http://pages.infinit.net/ctech/poupou.html
> -----Original Message-----
> From: mono-devel-list-admin at lists.ximian.com
> [mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of Boris
> Kirzner
> Sent: 17 mars 2005 04:20
> To: mono-devel-list at lists.ximian.com; mono-hackers-list at ximian.com
> Subject: [Mono-devel-list] [Mono-devel-list][Mono-hackers-list] Tests
> for DirectoryServices
>
>
> Hello all
> Attached is the test for DirectoryServices.DirectoryEntry class.
> I tried to make the test self-contained as possible, but it still
> assumes OpenLDAP server is up and running.
> Note - for the test to run you need to change the server name in the
> test body.
> Additionally attached is a slapd.conf of the OpenLDAP server.
>
> If no one objects, I'm going to commit.
>
> Thanks
> Boris
>
> --
> Boris Kirzner
> Mainsoft Corporation
> http://www.mainsoft.com
>
>
More information about the Mono-devel-list
mailing list