What would be a good way to mock the Children property of System.DirectoryServices.DirectoryEntry and the Find method of DirectoryEntries? I'm trying to use the adapter pattern to wrap DirectoryEntry and DirectoryEntries, but I'm not sure how to implement the Children property:
public interface IDirectoryEntries
{
IDirectoryEntry Find(string name);
}
public interface IDirectoryEntry
{
..
IDirectoryEntries Children { get; }
..
}
The Children Property if defined like this in the framework:
class DirectoryEntry
{
..
public DirectoryEntries Children { get; }
..
}
Regards, Frank
Aucun commentaire:
Enregistrer un commentaire