test_addExtCollection_unique_handle Subroutine

public subroutine test_addExtCollection_unique_handle()

Arguments

None

Calls

proc~~test_addextcollection_unique_handle~~CallsGraph proc~test_addextcollection_unique_handle test_addExtCollection_unique_handle add_message add_message proc~test_addextcollection_unique_handle->add_message assertfalse assertfalse proc~test_addextcollection_unique_handle->assertfalse none~add_ext_collection ClientThread%add_ext_collection proc~test_addextcollection_unique_handle->none~add_ext_collection none~get_connection BaseThread%get_connection proc~test_addextcollection_unique_handle->none~get_connection none~set_connection BaseThread%set_connection proc~test_addextcollection_unique_handle->none~set_connection none~add_ext_collection->none~get_connection interface~mapl_assert MAPL_Assert none~add_ext_collection->interface~mapl_assert proc~mapl_return MAPL_Return none~add_ext_collection->proc~mapl_return proc~mapl_verify MAPL_Verify none~add_ext_collection->proc~mapl_verify receive receive none~add_ext_collection->receive send send none~add_ext_collection->send none~get_connection->interface~mapl_assert none~get_connection->proc~mapl_return 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_addExtCollection_unique_handle()
      type (MockClientThread) :: c
      class (AbstractSocket), pointer :: connection
      integer :: handle_foo
      integer :: handle_bar
      type (MockSocketLog), target :: log

      call c%set_connection(MockSocket(log))
      connection => c%get_connection()
      select type (connection)
      type is (MockSocket)
         call connection%add_message(IdMessage(1))
         call connection%add_message(IdMessage(2))
      end select

      handle_foo = c%add_ext_collection(template='foo')
      handle_bar = c%add_ext_collection(template='bar')
      @assertFalse(handle_foo == handle_bar)
      
   end subroutine test_addExtCollection_unique_handle