KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > naming > directory > MockAttributes


1 package com.mockobjects.naming.directory;
2
3 import javax.naming.directory.Attributes JavaDoc;
4 import javax.naming.directory.Attribute JavaDoc;
5 import javax.naming.NamingEnumeration JavaDoc;
6 import com.mockobjects.*;
7 import java.util.*;
8
9 public class MockAttributes extends MockObject implements Attributes JavaDoc{
10     private ReturnObjectList myAttributesToReturn = new ReturnObjectList("attributes");
11     private ExpectationList myAttributes = new ExpectationList("attributes");
12
13     public boolean isCaseIgnored(){
14         notImplemented();
15         return false;
16     }
17
18     public int size(){
19         notImplemented();
20         return 0;
21     }
22
23     public void setupAddGet(Attribute JavaDoc attribute){
24         myAttributesToReturn.addObjectToReturn(attribute);
25     }
26
27     public void setExpectedName(String JavaDoc aName){
28         myAttributes.addExpected(aName);
29     }
30
31     public Attribute JavaDoc get(String JavaDoc aName){
32         myAttributes.addActual(aName);
33         return (Attribute JavaDoc)myAttributesToReturn.nextReturnObject();
34     }
35
36     public NamingEnumeration JavaDoc getAll(){
37         notImplemented();
38         return null;
39     }
40
41     public NamingEnumeration JavaDoc getIDs(){
42         notImplemented();
43         return null;
44     }
45
46     public Attribute JavaDoc put(String JavaDoc name, Object JavaDoc object){
47         notImplemented();
48         return null;
49     }
50
51     public Attribute JavaDoc put(Attribute JavaDoc attribute){
52         notImplemented();
53         return null;
54     }
55
56     public Attribute JavaDoc remove(String JavaDoc attributeName){
57         notImplemented();
58         return null;
59     }
60
61     public Object JavaDoc clone(){
62         notImplemented();
63         return null;
64     }
65 }
66
Popular Tags