test_retrieve_exists Subroutine

public subroutine test_retrieve_exists()

Arguments

None

Calls

proc~~test_retrieve_exists~2~~CallsGraph proc~test_retrieve_exists~2 Test_StringGridFactoryMap::test_retrieve_exists assertequal assertequal proc~test_retrieve_exists~2->assertequal assertfalse assertfalse proc~test_retrieve_exists~2->assertfalse asserttrue asserttrue proc~test_retrieve_exists~2->asserttrue none~at~6 MAPL_StringGridFactoryMapMod::StringGridFactoryMap%at proc~test_retrieve_exists~2->none~at~6 none~insert~3 MAPL_StringGridFactoryMapMod::StringGridFactoryMap%insert proc~test_retrieve_exists~2->none~insert~3 none~to_string MAPL_AbstractGridFactoryMod::AbstractGridFactory%to_string proc~test_retrieve_exists~2->none~to_string none~find~5 MAPL_StringGridFactoryMapMod::StringGridFactoryMap%find none~at~6->none~find~5 none~insert_pair~2 MAPL_StringGridFactoryMapMod::StringGridFactoryMap%insert_pair none~insert~3->none~insert_pair~2

Source Code

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

      @assertFalse(associated(registry%at('a')))
      
      call registry%insert('a', MockGridFactory('A'))
      @assertTrue(associated(registry%at('a')))

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

   end subroutine test_retrieve_exists