use of org.nhindirect.monitor.condition.TxCompletionCondition in project nhin-d by DirectProject.
the class VariableCompletionCondition_isTimelyAndRequiredTest method testIsTimelyAndRequired_emptyDetails_assertFalse.
@Test
public void testIsTimelyAndRequired_emptyDetails_assertFalse() {
TxCompletionCondition cond1 = mock(TxCompletionCondition.class);
TxCompletionCondition cond2 = mock(TxCompletionCondition.class);
VariableCompletionCondition cond = new VariableCompletionCondition(cond1, cond2);
Tx msg = new Tx(TxMessageType.IMF, new HashMap<String, TxDetail>());
assertFalse(cond.isRelAndTimelyRequired(msg));
}
use of org.nhindirect.monitor.condition.TxCompletionCondition in project nhin-d by DirectProject.
the class VariableCompletionCondition_isTimelyAndRequiredTest method testIsTimelyAndRequired_NoMNDOptionDetails_assertFalse.
@Test
public void testIsTimelyAndRequired_NoMNDOptionDetails_assertFalse() {
TxCompletionCondition cond1 = mock(TxCompletionCondition.class);
TxCompletionCondition cond2 = mock(TxCompletionCondition.class);
VariableCompletionCondition cond = new VariableCompletionCondition(cond1, cond2);
Map<String, TxDetail> details = new HashMap<String, TxDetail>();
details.put(TxDetailType.FROM.getType(), new TxDetail(TxDetailType.FROM, "me@test.com"));
Tx msg = new Tx(TxMessageType.IMF, details);
assertFalse(cond.isRelAndTimelyRequired(msg));
}
use of org.nhindirect.monitor.condition.TxCompletionCondition in project nhin-d by DirectProject.
the class VariableCompletionCondition_isTimelyAndRequiredTest method testIsTimelyAndRequired_nullMessage_assertFalse.
@Test
public void testIsTimelyAndRequired_nullMessage_assertFalse() {
TxCompletionCondition cond1 = mock(TxCompletionCondition.class);
TxCompletionCondition cond2 = mock(TxCompletionCondition.class);
VariableCompletionCondition cond = new VariableCompletionCondition(cond1, cond2);
assertFalse(cond.isRelAndTimelyRequired(null));
}
use of org.nhindirect.monitor.condition.TxCompletionCondition in project nhin-d by DirectProject.
the class VariableCompletionCondition_constructionTest method testConstruction.
@Test
public void testConstruction() {
TxCompletionCondition cond1 = mock(TxCompletionCondition.class);
TxCompletionCondition cond2 = mock(TxCompletionCondition.class);
VariableCompletionCondition cond = new VariableCompletionCondition(cond1, cond2);
assertEquals(cond1, cond.timelyRelCondition);
assertEquals(cond2, cond.generalCondition);
}
use of org.nhindirect.monitor.condition.TxCompletionCondition in project nhin-d by DirectProject.
the class VariableCompletionCondition_getIncompleteRecipientsEmptyTxsTest method testIsComplete_noMessageToTrack_emptyTxs.
@Test
public void testIsComplete_noMessageToTrack_emptyTxs() {
TxCompletionCondition cond = mock(TxCompletionCondition.class);
VariableCompletionCondition condition = new VariableCompletionCondition(cond, cond);
Tx originalMessage = TestUtils.makeMessage(TxMessageType.DSN, "", UUID.randomUUID().toString(), "gm2552@cerner.com", "gm2552@direct.securehealthemail.com", "");
Collection<Tx> txs = new ArrayList<Tx>();
txs.add(originalMessage);
Collection<String> recips = condition.getIncompleteRecipients(txs);
assertEquals(0, recips.size());
}
Aggregations