Skip to content

Commit

Permalink
add missing identifier in when other
Browse files Browse the repository at this point in the history
  • Loading branch information
issacto committed Aug 6, 2023
1 parent 1d6dc3f commit 08e76d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1160,12 +1160,13 @@ public String getCurrentFieldName() {
return currentFieldName;
}

public Mock getWhenOtherMock(String type, List<String> lines, boolean withComments){
public Mock getWhenOtherMock(String type, List<String> lines, String itdentifier, boolean withComments){
mockNumber += 1;
Mock mock = new Mock(currentTestSuiteName ,currentTestCaseName, testSuiteNumber, testCaseNumber,mockNumber);
mock.addLinesWithoutMoving(lines);
mock.setScope(MockScope.Local);
mock.setType(type);
mock.setIdentifier(itdentifier);
return mock;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,9 @@ public void prepareNextParse() {
Config.setDecimalPointIsCommaFromFile();
}

public Mock getWhenOtherMock(String type, List<String> lines, boolean withComments){
public Mock getWhenOtherMock(String type, List<String> lines, String identifier, boolean withComments){
// Local scope
return testSuiteParser.getWhenOtherMock(type,lines, withComments);
return testSuiteParser.getWhenOtherMock(type,lines, identifier, withComments);
}

public String generateWhenOtherMockPerformCall(Mock mock){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ private void closeReadersAndWriters(String programName) {
}

private void writeWhenOtherMockedSection(String sourceLine) throws IOException{
Mock mock = testSuiteParserController.getWhenOtherMock(currentMockType, interpreter.getSectionLines(), true);
Mock mock = testSuiteParserController.getWhenOtherMock(currentMockType, interpreter.getSectionLines(), currentIdentifier, true);
writerController.writeLine(testSuiteParserController.generateWhenOtherMockPerformCall(mock));
writerController.writeLines(testSuiteParserController.getEndEvaluateLine());
writerController.writeLine(sourceLine);
Expand Down

0 comments on commit 08e76d8

Please sign in to comment.