i have class a1 implementing ismtponarrival.
in public method
public void onarrival(message msg, ref cdoeventstatus eventstatus) { string strfixedlist = msg.envelopefields["http://schemas.microsoft.com/cdo/smtpenvelope/recipientlist"].value.tostring(); } i writing nunit test event sink. in unit test method have private method pick , eml file , returns me cdo.message , object passed onarrival.
private cdo.message readmessage(string emlfilename) { cdo.message msg = new cdo.messageclass(); adodb.stream stream = new adodb.streamclass(); ... msg.datasource.openobject(stream, "_stream"); msg.datasource.save(); return msg; } when call public method
a1 b = new a1(); b.onarrival(msg, ref cdoevent);
an exception thrown in "msg.envelopefields["http://schemas.microsoft.com/cdo/smtpenvelope/recipientlist"]". can 1 please let me know issue?.
the exception "the requested property or feature, while supported, not available @ time or in context".
there work around , had flag set , if unit test hardcode envelope fields.
this working.
Comments
Post a Comment