-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Placeholder text.
This Use Case might still need to be detailed better (like providing a flowchart).
Issue to tackle
When we have a Given/Then tag with a description that does not related one-to-one with the related helper method we might want to implement logic to allow removal of both tag and helper method. At te moment it will only remove the Given/Then.
Example of current behaviour
Making use of the existing test codeunit example TestObjectWithTwoFeatures.Codeunit.al, where we remove from TestFunction2 Given (or Then).
[Test]
procedure TestFunction2()
// [FEATURE] Feature 1
begin
// [SCENARIO 0002] Test function 2
// [Given] Valid Given
CreateValidGiven_2();
// [When] Valid When
ValidWhen_2();
// [Then] Valid Then
VerifyValidThen_2();
end;
The result will be (when removing Given):
[Test]
procedure TestFunction2()
// [FEATURE] Feature 1
begin
// [SCENARIO 0002] Test function 2
// [When] Valid When
ValidWhen_2();
// [Then] Valid Then
VerifyValidThen_2();
end;
But the related helper method CreateValidGiven_2 will not be removed. Doing the same for TestFunction1
[Test]
procedure TestFunction1()
// [FEATURE] Feature 1
begin
// [SCENARIO 0001] Test function 1
// [Given] Valid Given
CreateValidGiven();
// [When] Valid When
ValidWhen();
// [Then] Valid Then
VerifyValidThen();
end;
Where the result will be (when removing Given):
[Test]
procedure TestFunction1()
// [FEATURE] Feature 1
begin
// [SCENARIO 0001] Test function 1
// [When] Valid When
ValidWhen();
// [Then] Valid Then
VerifyValidThen();
end;
And with it the helper method CreateValidGiven will be removed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request