Package com.mockobjects.naming.directory
Class MockDirContext
java.lang.Object
com.mockobjects.MockObject
com.mockobjects.naming.MockContext
com.mockobjects.naming.directory.MockDirContext
- All Implemented Interfaces:
Verifiable
,Context
,DirContext
-
Field Summary
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
Fields inherited from interface javax.naming.directory.DirContext
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bind
(String aName, Object object, Attributes attributes) void
bind
(Name aName, Object object, Attributes attributes) createSubcontext
(String aName, Attributes attributes) createSubcontext
(Name aName, Attributes attributes) getAttributes
(String aName) getAttributes
(String aName, String[] attrIds) getAttributes
(Name aName) getAttributes
(Name aName, String[] attrIds) getSchemaClassDefinition
(String aName) getSchemaClassDefinition
(Name aName) void
modifyAttributes
(String aName, int aModificationOperation, Attributes attributes) void
modifyAttributes
(String aName, ModificationItem[] mods) void
modifyAttributes
(Name aName, int aModificationOperation, Attributes attributes) void
modifyAttributes
(Name aName, ModificationItem[] mods) void
rebind
(String aName, Object object, Attributes attributes) void
rebind
(Name aName, Object object, Attributes attributes) search
(String aName, String aFilter, Object[] filterArgs, SearchControls cons) search
(String aSearchName, String aFilter, SearchControls searchControls) search
(String aName, Attributes attributes) search
(String aName, Attributes attributes, String[] anAttributeToReturn) search
(Name aName, String aFilter, Object[] filterArgs, SearchControls cons) search
(Name aName, String aFilter, SearchControls cons) search
(Name aName, Attributes attributes) search
(Name aName, Attributes attributes, String[] anAttributeToReturn) void
setExpectedGetAttributesCount
(int callCount) void
void
setExpectedModifyAttributes
(String aName, int aModificationOperation, Attributes attributes) void
setExpectedSearch
(String aSearchName, String aFilter, SearchControls searchControls) void
setupAttributes
(Attributes anAttributeToReturn) void
setupSearchResult
(NamingEnumeration results) Methods inherited from class com.mockobjects.naming.MockContext
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, setExpectedBind, setExpectedCreateSubContext, setExpectedLookupName, setExpectedReBind, setupAddCreateSubContext, setupAddLookup, unbind, unbind
Methods inherited from class com.mockobjects.MockObject
notImplemented, notYetImplemented, verify
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
-
Constructor Details
-
MockDirContext
public MockDirContext()
-
-
Method Details
-
setupAttributes
-
setExpectedGetAttributesName
-
setExpectedGetAttributesCount
public void setExpectedGetAttributesCount(int callCount) -
getAttributes
- Specified by:
getAttributes
in interfaceDirContext
- Throws:
NamingException
-
getAttributes
- Specified by:
getAttributes
in interfaceDirContext
- Throws:
NamingException
-
getAttributes
- Specified by:
getAttributes
in interfaceDirContext
- Throws:
NamingException
-
getAttributes
- Specified by:
getAttributes
in interfaceDirContext
- Throws:
NamingException
-
setExpectedModifyAttributes
public void setExpectedModifyAttributes(String aName, int aModificationOperation, Attributes attributes) -
modifyAttributes
public void modifyAttributes(Name aName, int aModificationOperation, Attributes attributes) throws NamingException - Specified by:
modifyAttributes
in interfaceDirContext
- Throws:
NamingException
-
modifyAttributes
public void modifyAttributes(String aName, int aModificationOperation, Attributes attributes) throws NamingException - Specified by:
modifyAttributes
in interfaceDirContext
- Throws:
NamingException
-
modifyAttributes
- Specified by:
modifyAttributes
in interfaceDirContext
- Throws:
NamingException
-
modifyAttributes
- Specified by:
modifyAttributes
in interfaceDirContext
- Throws:
NamingException
-
bind
- Specified by:
bind
in interfaceDirContext
- Throws:
NamingException
-
bind
- Specified by:
bind
in interfaceDirContext
- Throws:
NamingException
-
rebind
- Specified by:
rebind
in interfaceDirContext
- Throws:
NamingException
-
rebind
- Specified by:
rebind
in interfaceDirContext
- Throws:
NamingException
-
createSubcontext
- Specified by:
createSubcontext
in interfaceDirContext
- Throws:
NamingException
-
createSubcontext
- Specified by:
createSubcontext
in interfaceDirContext
- Throws:
NamingException
-
getSchema
- Specified by:
getSchema
in interfaceDirContext
- Throws:
NamingException
-
getSchema
- Specified by:
getSchema
in interfaceDirContext
- Throws:
NamingException
-
getSchemaClassDefinition
- Specified by:
getSchemaClassDefinition
in interfaceDirContext
- Throws:
NamingException
-
getSchemaClassDefinition
- Specified by:
getSchemaClassDefinition
in interfaceDirContext
- Throws:
NamingException
-
search
public NamingEnumeration search(Name aName, Attributes attributes, String[] anAttributeToReturn) throws NamingException - Specified by:
search
in interfaceDirContext
- Throws:
NamingException
-
search
public NamingEnumeration search(String aName, Attributes attributes, String[] anAttributeToReturn) throws NamingException - Specified by:
search
in interfaceDirContext
- Throws:
NamingException
-
search
- Specified by:
search
in interfaceDirContext
- Throws:
NamingException
-
search
- Specified by:
search
in interfaceDirContext
- Throws:
NamingException
-
search
public NamingEnumeration search(Name aName, String aFilter, SearchControls cons) throws NamingException - Specified by:
search
in interfaceDirContext
- Throws:
NamingException
-
setExpectedSearch
-
setupSearchResult
-
search
public NamingEnumeration search(String aSearchName, String aFilter, SearchControls searchControls) throws NamingException - Specified by:
search
in interfaceDirContext
- Throws:
NamingException
-
search
public NamingEnumeration search(Name aName, String aFilter, Object[] filterArgs, SearchControls cons) throws NamingException - Specified by:
search
in interfaceDirContext
- Throws:
NamingException
-
search
public NamingEnumeration search(String aName, String aFilter, Object[] filterArgs, SearchControls cons) throws NamingException - Specified by:
search
in interfaceDirContext
- Throws:
NamingException
-