components/src/test/java/eu/internetofus/common/components/interaction_protocol_engine/ProtocolEventTest.java
/**
   * Check that can convert to a protocol message.
   *
   * @see ProtocolEvent#toProtocolMessage()
   */
Check that can convert to a protocol message.
Check that can convert to a protocol message .
@Test
  public void shouldToProtocolMessage() {
    final var event = this.createModelExample(1);
    final var expectedMsg = new ProtocolMessageTest().createModelExample(1);
    expectedMsg.sender.component = Component.INTERACTION_PROTOCOL_ENGINE;
    expectedMsg.sender.userId = event.userId;
    expectedMsg.receiver.component = Component.INTERACTION_PROTOCOL_ENGINE;
    expectedMsg.receiver.userId = event.userId;
    final var convert = event.toProtocolMessage();
    assertThat(convert).isEqualTo(expectedMsg);
  }
@ Test public void shouldToProtocolMessage ( ) { final var event = this . createModelExample ( 1 ) ; final var expectedMsg = new ProtocolMessageTest ( ) . createModelExample ( 1 ) ; expectedMsg . sender . component = Component . INTERACTION_PROTOCOL_ENGINE ; expectedMsg . sender . userId = event . userId ; expectedMsg . receiver . component = Component . INTERACTION_PROTOCOL_ENGINE ; expectedMsg . receiver . userId = event . userId ; final var convert = event . toProtocolMessage ( ) ; assertThat ( convert ) . isEqualTo ( expectedMsg ) ; }
Check that can convert to a protocol message.
Check that can convert to a protocol message .