use of org.nhindirect.stagent.trust.TrustEnforcementStatus in project nhin-d by DirectProject.
the class DefaultNHINDAgent_ProcessOutgoingMessage_Test method testMessageIsWrapped_WrapMessageIsNotCalled.
/**
*
* @throws Exception
*/
public void testMessageIsWrapped_WrapMessageIsNotCalled() throws Exception {
new TestPlan() {
protected OutgoingMessage createMessage() throws Exception {
MimeMessage mimeMsg = new SecondaryMimeMessage();
mimeMsg.setText("");
Message msg = new Message(mimeMsg) {
@Override
public String getContentType() throws MessagingException {
return MailStandard.MediaType.WrappedMessage;
}
};
NHINDAddressCollection recipients = new NHINDAddressCollection();
recipients.add(new NHINDAddress(""));
NHINDAddress sender = new NHINDAddress("");
theCreateMessage = new OutgoingMessage(msg, recipients, sender) {
@Override
protected void categorizeRecipients(TrustEnforcementStatus minTrustStatus) {
categorizeRecipientsCalls++;
categorizeRecipients_Internal(minTrustStatus);
}
};
return theCreateMessage;
}
protected void doAssertions() throws Exception {
assertEquals(0, wrapMessageCalls);
}
}.perform();
}
Aggregations