1 package com.mockobjects.naming.directory; 2 3 import javax.naming.directory.Attributes ; 4 import javax.naming.directory.Attribute ; 5 import javax.naming.NamingEnumeration ; 6 import com.mockobjects.*; 7 import java.util.*; 8 9 public class MockAttributes extends MockObject implements Attributes { 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 attribute){ 24 myAttributesToReturn.addObjectToReturn(attribute); 25 } 26 27 public void setExpectedName(String aName){ 28 myAttributes.addExpected(aName); 29 } 30 31 public Attribute get(String aName){ 32 myAttributes.addActual(aName); 33 return (Attribute )myAttributesToReturn.nextReturnObject(); 34 } 35 36 public NamingEnumeration getAll(){ 37 notImplemented(); 38 return null; 39 } 40 41 public NamingEnumeration getIDs(){ 42 notImplemented(); 43 return null; 44 } 45 46 public Attribute put(String name, Object object){ 47 notImplemented(); 48 return null; 49 } 50 51 public Attribute put(Attribute attribute){ 52 notImplemented(); 53 return null; 54 } 55 56 public Attribute remove(String attributeName){ 57 notImplemented(); 58 return null; 59 } 60 61 public Object clone(){ 62 notImplemented(); 63 return null; 64 } 65 } 66 | Popular Tags |