test_retrieve_multi Subroutine

public subroutine test_retrieve_multi()

Arguments

None

Calls

proc~~test_retrieve_multi~~CallsGraph proc~test_retrieve_multi test_retrieve_multi assertequal assertequal proc~test_retrieve_multi->assertequal none~at~13 StringGridFactoryMap%at proc~test_retrieve_multi->none~at~13 none~insert~9 StringGridFactoryMap%insert proc~test_retrieve_multi->none~insert~9 none~to_string~5 AbstractGridFactory%to_string proc~test_retrieve_multi->none~to_string~5 none~find~2 StringGridFactoryMap%find none~at~13->none~find~2 none~insert_pair StringGridFactoryMap%insert_pair none~insert~9->none~insert_pair

Source Code

   subroutine test_retrieve_multi()
      class (AbstractGridFactory), pointer :: factory
      type (StringGridFactoryMap) :: registry

      call registry%insert('a', MockGridFactory('A'))
      call registry%insert('b', MockGridFactory('B'))
      call registry%insert('c', MockGridFactory('C'))

      factory => registry%at('c')
      @assertEqual('C', factory%to_string())

      factory => registry%at('a')
      @assertEqual('A', factory%to_string())
      
   end subroutine test_retrieve_multi