TG_002.TC_003 - codemetropolis/CodeMetropolis GitHub Wiki

TG_002.TC_003

Test mapping with invalid cdfFile

Pre-requisites:

  • Java runtime 1.8

  • converterToMapping.xml exists in the mapping-1.4.0.jar's folder and is a valid cdfFile (produced by converter-1.4.0.jar with the input codemetropolis-toolchain-commons.graph)

  • sourcemeter_mapping_example_2_0.xml mapping description exists in the mapping-1.4.0.jar's folder and is valid

  • command line opened in the folder of mapping-1.4.0.jar

Steps:

  1. Open converterToMapping.xml with a text editor
  2. Delete content from line 10 to 20 and save the file
  3. Run "java -jar mapping-1.4.0.jar -i converterToMapping.xml -m sourcemeter_mapping_example_2_0.xml"

Expected result:

The tool warns the user that the input cdfFile content is invalid and exits normally without creating the output file.