1 package com.mockobjects.mail.internet; 2 3 import alt.javax.mail.internet.MimeMessage; 4 import com.mockobjects.ExpectationList; 5 import com.mockobjects.mail.MockMessage; 6 7 import javax.mail.Address ; 8 import javax.mail.Flags ; 9 import javax.mail.Folder ; 10 import javax.mail.MessagingException ; 11 import javax.mail.search.SearchTerm ; 12 import java.io.IOException ; 13 import java.io.InputStream ; 14 import java.io.OutputStream ; 15 import java.util.Enumeration ; 16 17 public class MockMimeMessage extends MockMessage implements MimeMessage { 18 private final ExpectationList myAddresses = 19 new ExpectationList("addresses"); 20 private final ExpectationList myRecipientTypes = 21 new ExpectationList("recipient types"); 22 23 public void setRecipient(javax.mail.Message.RecipientType type, Address address) throws MessagingException { 24 notImplemented(); 25 } 26 27 public void setExpectedAddRecipient(javax.mail.Message.RecipientType aType, 28 Address anAddress) { 29 30 myAddresses.addExpected(anAddress); 31 myRecipientTypes.addExpected(aType); 32 } 33 34 public void addRecipient(javax.mail.Message.RecipientType aType, 35 Address anAddress) throws MessagingException { 36 myAddresses.addActual(anAddress); 37 myRecipientTypes.addActual(aType); 38 } 39 40 public void setFlag(Flags.Flag flag, boolean b) throws MessagingException { 41 notImplemented(); 42 } 43 44 public int getMessageNumber() { 45 notImplemented(); 46 return 0; 47 } 48 49 public String getBody() { 50 notImplemented(); 51 return null; 52 } 53 54 public Folder getFolder() { 55 notImplemented(); 56 return null; 57 } 58 59 public void setBody(String messageText) { 60 notImplemented(); 61 } 62 63 public boolean isExpunged() { 64 notImplemented(); 65 return false; 66 } 67 68 public boolean match(SearchTerm term) throws MessagingException { 69 notImplemented(); 70 return false; 71 } 72 73 public Address [] getAllRecipients() throws MessagingException { 74 notImplemented(); 75 return new Address [0]; 76 } 77 78 public void setRecipients(javax.mail.Message.RecipientType type, String s) throws MessagingException { 79 notImplemented(); 80 } 81 82 public void addRecipients(javax.mail.Message.RecipientType type, String s) throws MessagingException { 83 notImplemented(); 84 } 85 86 public Address [] getReplyTo() throws MessagingException { 87 notImplemented(); 88 return new Address [0]; 89 } 90 91 public void setReplyTo(Address [] addresses) throws MessagingException { 92 notImplemented(); 93 } 94 95 public void setSubject(String s, String s1) throws MessagingException { 96 notImplemented(); 97 } 98 99 public String getEncoding() throws MessagingException { 100 notImplemented(); 101 return null; 102 } 103 104 public String getContentID() throws MessagingException { 105 notImplemented(); 106 return null; 107 } 108 109 public void setContentID(String s) throws MessagingException { 110 notImplemented(); 111 } 112 113 public String getContentMD5() throws MessagingException { 114 notImplemented(); 115 return null; 116 } 117 118 public void setContentMD5(String s) throws MessagingException { 119 notImplemented(); 120 } 121 122 public void setDescription(String s, String s1) throws MessagingException { 123 notImplemented(); 124 } 125 126 public String [] getContentLanguage() throws MessagingException { 127 notImplemented(); 128 return new String [0]; 129 } 130 131 public void setContentLanguage(String [] strings) throws MessagingException { 132 notImplemented(); 133 } 134 135 public String getMessageID() throws MessagingException { 136 notImplemented(); 137 return null; 138 } 139 140 public InputStream getRawInputStream() throws MessagingException { 141 notImplemented(); 142 return null; 143 } 144 145 public void setText(String s, String s1) throws MessagingException { 146 notImplemented(); 147 } 148 149 public void writeTo(OutputStream stream, String [] strings) throws IOException , MessagingException { 150 notImplemented(); 151 } 152 153 public String getHeader(String s, String s1) throws MessagingException { 154 notImplemented(); 155 return null; 156 } 157 158 public void addHeaderLine(String s) throws MessagingException { 159 notImplemented(); 160 } 161 162 public Enumeration getAllHeaderLines() throws MessagingException { 163 notImplemented(); 164 return null; 165 } 166 167 public Enumeration getMatchingHeaderLines(String [] strings) throws MessagingException { 168 notImplemented(); 169 return null; 170 } 171 172 public Enumeration getNonMatchingHeaderLines(String [] strings) throws MessagingException { 173 notImplemented(); 174 return null; 175 } 176 177 public boolean isSet(Flags.Flag flag) throws MessagingException { 178 notImplemented(); 179 return false; 180 } 181 } 182 | Popular Tags |