SenderReceiverHelperMCCIMT000100UV01 { public static MCCIMT000100UV01Sender CreateSender(II senderDeviceId) { MCCIMT000100UV01Sender sender = new MCCIMT000100UV01Sender(); sender.setTypeCode(CommunicationFunctionType.SND); sender.setDevice(createDevice(senderDeviceId)); return sender; }  static MCCIMT000100UV01Sender CreateSender(II senderDeviceId); static MCCIMT000100UV01Sender CreateSender(); static MCCIMT000100UV01Receiver CreateReceiver(II receiverDeviceId); static MCCIMT000100UV01Receiver CreateReceiver();  }
@Test public void testCreateSender() { SenderReceiverHelperMCCIMT000100UV01 sender = new SenderReceiverHelperMCCIMT000100UV01(); MCCIMT000100UV01Sender senderDevice = new MCCIMT000100UV01Sender(); senderDevice = sender.CreateSender(createSenderDeviceId()); assertEquals(senderDevice.getDevice().getId().get(0).getAssigningAuthorityName(), "CONNECTSender"); assertEquals(senderDevice.getDevice().getId().get(0).getExtension(),"D123401"); assertEquals(senderDevice.getDevice().getId().get(0).getRoot(), "1.1"); }
@Test public void testCreateSenderWhenDeviceIdNull() { MCCIMT000100UV01Sender senderDevice = new MCCIMT000100UV01Sender(); SenderReceiverHelperMCCIMT000100UV01 sender = new SenderReceiverHelperMCCIMT000100UV01(); senderDevice = sender.CreateSender(); assertNull(senderDevice.getDevice().getId().get(0)); }