1 package com.mockobjects.naming.directory; 2 3 import com.mockobjects.*; 4 import javax.naming.directory.*; 5 import javax.naming.*; 6 7 public class MockAttribute extends MockObject implements Attribute{ 8 private final ReturnValue myObjectToReturn = new ReturnValue("object"); 9 10 public NamingEnumeration getAll() throws NamingException{ 11 notImplemented(); 12 return null; 13 } 14 15 public void setupGet(Object aObjectToReturn){ 16 this.myObjectToReturn.setValue(aObjectToReturn); 17 } 18 19 public Object get() throws NamingException{ 20 return myObjectToReturn.getValue(); 21 } 22 23 public int size(){ 24 notImplemented(); 25 return 0; 26 } 27 28 public String getID(){ 29 notImplemented(); 30 return null; 31 } 32 33 public boolean contains(Object object){ 34 notImplemented(); 35 return false; 36 } 37 38 public boolean add(Object object){ 39 notImplemented(); 40 return false; 41 } 42 43 public boolean remove(Object object){ 44 notImplemented(); 45 return false; 46 } 47 48 public void clear(){ 49 notImplemented(); 50 } 51 52 public DirContext getAttributeSyntaxDefinition() throws NamingException{ 53 notImplemented(); 54 return null; 55 } 56 57 public DirContext getAttributeDefinition() throws NamingException{ 58 notImplemented(); 59 return null; 60 } 61 62 public Object clone(){ 63 notImplemented(); 64 return null; 65 } 66 67 public boolean isOrdered(){ 68 notImplemented(); 69 return false; 70 } 71 72 public Object get(int index) throws NamingException{ 73 notImplemented(); 74 return null; 75 } 76 77 public Object remove(int index){ 78 notImplemented(); 79 return null; 80 } 81 82 public void add(int index, Object object){ 83 notImplemented(); 84 } 85 86 public Object set(int index, Object object){ 87 notImplemented(); 88 return null; 89 } 90 91 public String toString(){ 92 if(myObjectToReturn==null){ 93 return "null"; 94 }else{ 95 return myObjectToReturn.toString(); 96 } 97 } 98 99 } 100 | Popular Tags |