test_class.declarator: settings = new AMLSettings()
test_class.modifier: private static final
test_class.original_string: private static final AMLSettings settings = new AMLSettings();
test_class.type: AMLSettings
test_class.var_name: settings
test_class.declarator: actionRequirements = Mockito.mock(ActionRequirements.class)
test_class.modifier: private static final
test_class.original_string: private static final ActionRequirements actionRequirements = Mockito.mock(ActionRequirements.class);
test_class.type: ActionRequirements
test_class.var_name: actionRequirements
test_class.declarator: actionInfo = Mockito.mock(ActionInfo.class)
test_class.modifier: private static final
test_class.original_string: private static final ActionInfo actionInfo = Mockito.mock(ActionInfo.class);
test_class.type: ActionInfo
test_class.var_name: actionInfo
test_class.declarator: actionInfoVoid = Mockito.mock(ActionInfo.class)
test_class.modifier: private static final
test_class.original_string: private static final ActionInfo actionInfoVoid = Mockito.mock(ActionInfo.class);
test_class.type: ActionInfo
test_class.var_name: actionInfoVoid
test_class.declarator: actionManager = Mockito.mock(ActionManager.class)
test_class.modifier: private static final
test_class.original_string: private static final ActionManager actionManager = Mockito.mock(ActionManager.class);
test_class.type: ActionManager
test_class.var_name: actionManager
test_class.file: BackEnd/Core/sailfish-core/src/test/java/com/exactpro/sf/aml/AMLConverterTest.java
test_class.identifier: AMLConverterTest
test_class.superclass: extends AbstractTest
test_case.body: @Test
      public void negativeTest() throws Exception {
          File matrixFile = new File(BASE_DIR, "src/test/resources/aml/converter-negative-test.csv");
  
          try(AdvancedMatrixReader matrixReader = new AdvancedMatrixReader(matrixFile)) {
              AMLMatrix matrix = AMLReader.read(matrixReader);
  
              AlertCollector collector = new AlertCollector();
  
              AMLConverter.convert(matrix, settings, actionManager, collector);
  
              Collection<Alert> errors = collector.getAlerts();
  
              Assert.assertEquals(63, errors.size());
  
              Alert error = new Alert(2, "29", "#reference", "Variable '29' start with a digit", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(3, null, "#messages_count", "Invalid value: -7", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(4, null, "#outcome", "Invalid value: foo (expected: <group>:<name>)", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(5, null, "#outcome", "Invalid outcome group: 1foo (Variable '1foo' start with a digit)", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(6, null, "#outcome", "Invalid outcome name: 1bar (Variable '1bar' start with a digit)", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(7, "foo", "#reference", "Invalid value: foo (expected: %{name})", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(8, "%{}", "#reference", "Invalid empty variable name", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(9, "!", "#reference", "Invalid empty variable name", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(10, "%{ref1}", "#reference", "Variable '%{ref1}' contain invalid character", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(10, "%{ref1}", "#reference_to_filter", "Variable '%{ref2}' contain invalid character", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(10, "%{ref1}", "#template", "Variable '%{ref3}' contain invalid character", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(11, "foo bar", "#reference", "Variable 'foo bar' contain white space", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(11, "foo bar", "#reference_to_filter", "Variable 'foo baz' contain white space", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(11, "foo bar", "#template", "Variable 'foo bax' contain white space", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(12, "public", "#reference", "Variable 'public' is reserved java word", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(12, "public", "#reference_to_filter", "Variable 'void' is reserved java word", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(12, "public", "#template", "Variable 'int' is reserved java word", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(13, "foo*bar", "#reference", "Variable 'foo*bar' contain invalid character", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(13, "foo*bar", "#reference_to_filter", "Variable 'foo/bar' contain invalid character", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(13, "foo*bar", "#template", "Variable 'foo:bar' contain invalid character", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(14, "_foobar", "#reference", "Variable '_foobar' start with invalid character '_'", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(14, "_foobar", "#reference_to_filter", "Variable '_foobaz' start with invalid character '_'", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(14, "_foobar", "#template", "Variable '_foobax' start with invalid character '_'", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(15, "0foobar", "#reference", "Variable '0foobar' start with a digit", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(15, "0foobar", "#reference_to_filter", "Variable '1foobar' start with a digit", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(15, "0foobar", "#template", "Variable '2foobar' start with a digit", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(16, "!foobar", "#reference", "Variable '!foobar' contain invalid character", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(16, "!foobar", "#reference_to_filter", "Variable '!foobar' contain invalid character", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(16, "!foobar", "#template", "Variable '!foobar' contain invalid character", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(17, null, "#service_name", "Variable 'foo bar' contain white space", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(18, null, "#service_name", "Variable 'public' is reserved java word", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(19, null, "#service_name", "Variable 'foo*bar' contain invalid character", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(20, null, "#service_name", "Variable '_foobar' start with invalid character '_'", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(21, null, "#service_name", "Variable '0foobar' start with a digit", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(23, "s1", "#static_type", "Unknown type: foo", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(24, null, "#timeout", "Value must be positive: -1", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(25, null, "#timeout", "Value must be in long format or a static variable reference: foo", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(26, null, "#timeout", "Invalid empty variable name", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(27, "s2", "#static_type", "Required column is missing", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(28, null, "#action", "Unknown action: foobar", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(30, "sv", null, "Duplicated reference found in lines: 29, 30: 'sv'", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(32, "rf", null, "Duplicated reference found in lines: 31, 32: 'rf'", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(33, "r0", "#action", "Static action must have a name", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(34, null, "#reference", "Static action must have a reference or reference to filter", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(35, "r1", "#action", "Static action must return a value", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(36, "ref", "#reference", "#reference cannot be equal to #reference_to_filter", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(36, "ref", "#reference", "#reference cannot be equal to #template", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(36, "ref", "#reference_to_filter", "#reference_to_filter cannot be equal to #template", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(37, null, "#message_type", "Incompatible message type: ArrayMessage", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(38, null, "#dependencies", "Variable '123' start with a digit", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(39, null, "#verifications_order",
                      "Invalid value: Value1: (expected: <field>:<status>)", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(40, null, "#verifications_order", "Invalid status name: FAKE (Value1:FAKE)", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(41, null, "#verifications_order",
                      "Invalid message field name: Va lue1 (Variable 'Va lue1' contain white space)", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(42, null, "#verifications_order",
                      "Invalid message field name: 1Value1 (Variable '1Value1' start with a digit)", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(43, null, "#verifications_order",
                      "Invalid status name: 1PASSED (Variable '1PASSED' start with a digit)", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(44, null, Column.KeyFields.getName(), "Key field is not set: FieldA", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(44, null, Column.KeyFields.getName(), "Key field is not set: FieldB", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(45, null, Column.KeyFields.getName(), "Variable 'Field A' contain white space", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(45, null, Column.KeyFields.getName(), "Variable '///' contain invalid character", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(46, null, "#messages_count", "Invalid value: -1", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(48, null, "#messages_count", "Invalid value: d", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(50, null, "#messages_count", "Invalid value: ${toInteger(\"1\")} +  1", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
              error = new Alert(52, null, "#messages_count", "Invalid value: [1..4]", AlertType.ERROR);
              Assert.assertTrue(error.toString(), errors.remove(error));
  
              Assert.assertEquals(0, errors.size());
          }
      }
test_case.class_method_signature: AMLConverterTest.negativeTest()
test_case.full_signature: @Test public void negativeTest()
test_case.identifier: negativeTest
test_case.invocations: read convert getAlerts assertEquals size assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove getName assertTrue toString remove getName assertTrue toString remove getName assertTrue toString remove getName assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertTrue toString remove assertEquals size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void negativeTest()
focal_class.file: BackEnd/Core/sailfish-core/src/main/java/com/exactpro/sf/aml/AMLConverter.java
focal_class.identifier: AMLConverter
focal_class.class_method_signature: AMLConverter.convert(AMLMatrix matrix, AMLSettings settings, IActionManager actionManager, AlertCollector alertCollector)
focal_class.full_signature: public static ListMultimap<AMLBlockType, AMLTestCase> convert(AMLMatrix matrix, AMLSettings settings, IActionManager actionManager, AlertCollector alertCollector)
focal_class.identifier: convert
focal_class.modifiers: public static
focal_class.parameters: (AMLMatrix matrix, AMLSettings settings, IActionManager actionManager, AlertCollector alertCollector)
focal_class.return: ListMultimap<AMLBlockType, AMLTestCase>
focal_class.signature: ListMultimap<AMLBlockType, AMLTestCase> convert(AMLMatrix matrix, AMLSettings settings, IActionManager actionManager, AlertCollector alertCollector)
focal_method.body: public static ListMultimap<AMLBlockType, AMLTestCase> convert(AMLMatrix matrix, AMLSettings settings, IActionManager actionManager, AlertCollector alertCollector) throws AMLException {
          AMLMatrixWrapper wrapper = new AMLMatrixWrapper(matrix);
          AMLConverterVisitor visitor = new AMLConverterVisitor(settings, actionManager, wrapper, alertCollector);
  
          for(AMLBlock block : matrix.getBlocks()) {
              block.accept(visitor);
          }
  
          return visitor.getBlocks();
      }
focal_method.class_method_signature: AMLConverter.convert(AMLMatrix matrix, AMLSettings settings, IActionManager actionManager, AlertCollector alertCollector)
focal_method.full_signature: public static ListMultimap<AMLBlockType, AMLTestCase> convert(AMLMatrix matrix, AMLSettings settings, IActionManager actionManager, AlertCollector alertCollector)
focal_method.identifier: convert
focal_method.invocations: getBlocks accept getBlocks
focal_method.modifiers: public static
focal_method.parameters: (AMLMatrix matrix, AMLSettings settings, IActionManager actionManager, AlertCollector alertCollector)
focal_method.return: ListMultimap<AMLBlockType, AMLTestCase>
focal_method.signature: ListMultimap<AMLBlockType, AMLTestCase> convert(AMLMatrix matrix, AMLSettings settings, IActionManager actionManager, AlertCollector alertCollector)