You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
[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.
The text was updated successfully, but these errors were encountered:
lvanvugt
changed the title
Use Case: removing Given/Then with a related helper method which name is not a one-to-one match with Given/Then descriptin
Use Case: removing Given/Then with a related helper method which name is not a one-to-one match with Given/Then description
Mar 9, 2023
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
(orThen
).The result will be (when removing
Given
):But the related helper method
CreateValidGiven_2
will not be removed. Doing the same forTestFunction1
Where the result will be (when removing
Given
):And with it the helper method
CreateValidGiven
will be removed.The text was updated successfully, but these errors were encountered: