test_send_done Subroutine

public subroutine test_send_done()

Arguments

None

Calls

proc~~test_send_done~~CallsGraph proc~test_send_done test_send_done assertequal assertequal proc~test_send_done->assertequal get_type_id get_type_id proc~test_send_done->get_type_id none~get_connection BaseThread%get_connection proc~test_send_done->none~get_connection none~send~4 SimpleSocket%send proc~test_send_done->none~send~4 none~set_connection BaseThread%set_connection proc~test_send_done->none~set_connection none~set_visitor SimpleSocket%set_visitor proc~test_send_done->none~set_visitor receive receive proc~test_send_done->receive interface~mapl_assert MAPL_Assert none~get_connection->interface~mapl_assert proc~mapl_return MAPL_Return none~get_connection->proc~mapl_return none~send~4->none~get_connection dispatch dispatch none~send~4->dispatch none~send~4->interface~mapl_assert none~send~4->proc~mapl_return proc~mapl_verify MAPL_Verify none~send~4->proc~mapl_verify none~set_connection->proc~mapl_return at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   subroutine test_send_done()
      type (SimpleSocket) :: client_connection
      type (MockServerThread), target :: s
      type (SimpleSocket) :: server_connection
      class(BaseThread), pointer :: visitor
      class(AbstractSocket), pointer :: connection
      class(AbstractMessage), pointer :: msg

      call s%set_connection(server_connection)
      call client_connection%set_visitor(s)
      call client_connection%send(DoneMessage())
      @assertEqual('handle_Done()', s%log)
      visitor =>client_connection%visitor
      connection=>visitor%get_connection()
      msg => connection%receive()
      @assertEqual(DONE_ID,msg%get_type_id())
   end subroutine test_send_done