예제 #1
0
  private void test_tags_withTagsAnd3Tags(
      final String fileNameWithoutExt, final String userTestName) throws Exception {
    // prepare
    final String filePath = PRETTY_NEW_DIR_LOCATION + fileNameWithoutExt + "." + getExtension();
    final RobotFile modelFile = NewRobotFileTestHelper.getModelFileToModify("2.9");

    // test data prepare
    modelFile.includeTestCaseTableSection();
    TestCaseTable testCaseTable = modelFile.getTestCaseTable();

    RobotToken testName = new RobotToken();
    testName.setText(userTestName);
    TestCase test = new TestCase(testName);
    testCaseTable.addTest(test);
    TestCaseTags testTags = test.newTags();

    RobotToken tagOne = new RobotToken();
    tagOne.setText("tag1");
    RobotToken tagTwo = new RobotToken();
    tagTwo.setText("tag2");
    RobotToken tagThree = new RobotToken();
    tagThree.setText("tag3");
    testTags.addTag(tagOne);
    testTags.addTag(tagTwo);
    testTags.addTag(tagThree);

    // verify
    NewRobotFileTestHelper.assertNewModelTheSameAsInFile(filePath, modelFile);
  }