Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename tests method to more explicit names #107

Closed
massifben opened this issue May 31, 2022 · 1 comment · Fixed by #308
Closed

Rename tests method to more explicit names #107

massifben opened this issue May 31, 2022 · 1 comment · Fixed by #308
Assignees
Labels
enhancement New feature or request

Comments

@massifben
Copy link
Contributor

massifben commented May 31, 2022

A good convention is something like :

  • methodName_should_do_something
  • methodName_when_condition_should_do_something
  • methodName_when_condition_should_throw_exception
@samirromdhani
Copy link
Contributor

Similar request: Refactor tests structure in compas-sct

@samirromdhani samirromdhani linked a pull request Aug 22, 2023 that will close this issue
samirromdhani added a commit that referenced this issue Aug 28, 2023
…solation principal and best practice

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Aug 30, 2023
…os, closes #107, #196, #306

remove TODOs related to isolated test rule: another issue will cover that

update SclRootAdapterTest

update RootSDIAdapterTest & SDIAdapterTest

update LNAdapterTest

refactor(#107, #196, #306): add tag to tests that should be respect isolation principal and best practice

update LN0AdapterTest, LNAdapterTest, SDIAdapterTest..

update HeaderAdapterTest

update DOAdapterTest

update related elementXPath test

remove AbstractComLevel

update CommunicationAdapterTest

update ConnectedAPAdapterTest

update SubNetworkAdapterTest

update BDAAdapterTest, remove usage of AbstractDTTLevel
update HeaderAdapterTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Aug 30, 2023
…os, closes #107, #196, #306

remove TODOs related to isolated test rule: another issue will cover that

update SclRootAdapterTest

update RootSDIAdapterTest & SDIAdapterTest

update LNAdapterTest

refactor(#107, #196, #306): add tag to tests that should be respect isolation principal and best practice

update LN0AdapterTest, LNAdapterTest, SDIAdapterTest..

update HeaderAdapterTest

update DOAdapterTest

update related elementXPath test

remove AbstractComLevel

update CommunicationAdapterTest

update ConnectedAPAdapterTest

update SubNetworkAdapterTest

update BDAAdapterTest, remove usage of AbstractDTTLevel
update HeaderAdapterTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Aug 30, 2023
…os, closes #107, #196, #306

remove TODOs related to isolated test rule: another issue will cover that

update SclRootAdapterTest

update RootSDIAdapterTest & SDIAdapterTest

update LNAdapterTest

refactor(#107, #196, #306): add tag to tests that should be respect isolation principal and best practice

update LN0AdapterTest, LNAdapterTest, SDIAdapterTest..

update HeaderAdapterTest

update DOAdapterTest

update related elementXPath test

remove AbstractComLevel

update CommunicationAdapterTest

update ConnectedAPAdapterTest

update SubNetworkAdapterTest

update BDAAdapterTest, remove usage of AbstractDTTLevel
update HeaderAdapterTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Aug 31, 2023
…os, closes #107, #196, #306

remove TODOs related to isolated test rule: another issue will cover that

update SclRootAdapterTest

update RootSDIAdapterTest & SDIAdapterTest

update LNAdapterTest

refactor(#107, #196, #306): add tag to tests that should be respect isolation principal and best practice

update LN0AdapterTest, LNAdapterTest, SDIAdapterTest..

update test classes in scl.com package

update HeaderAdapterTesT

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.dtt package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update ExtRefServiceTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.sstation package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Aug 31, 2023
…os, closes #107, #196, #306

remove TODOs related to isolated test rule: another issue will cover that

update SclRootAdapterTest

update RootSDIAdapterTest & SDIAdapterTest

update LNAdapterTest

refactor(#107, #196, #306): add tag to tests that should be respect isolation principal and best practice

update LN0AdapterTest, LNAdapterTest, SDIAdapterTest..

update test classes in scl.com package

update HeaderAdapterTesT

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.dtt package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update ExtRefServiceTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.sstation package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Aug 31, 2023
…os, closes #107, #196, #306

remove TODOs related to isolated test rule: another issue will cover that

update SclRootAdapterTest

update RootSDIAdapterTest & SDIAdapterTest

update LNAdapterTest

refactor(#107, #196, #306): add tag to tests that should be respect isolation principal and best practice

update LN0AdapterTest, LNAdapterTest, SDIAdapterTest..

update test classes in scl.com package

update HeaderAdapterTesT

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.dtt package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update ExtRefServiceTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.sstation package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Sep 1, 2023
…os, closes #107, #196, #306

remove TODOs related to isolated test rule: another issue will cover that

update SclRootAdapterTest

update RootSDIAdapterTest & SDIAdapterTest

update LNAdapterTest

refactor(#107, #196, #306): add tag to tests that should be respect isolation principal and best practice

update LN0AdapterTest, LNAdapterTest, SDIAdapterTest..

update test classes in scl.com package

update HeaderAdapterTesT

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.dtt package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update ExtRefServiceTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.sstation package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update class name AbstractDTTLevel to DataTypeTemplateTestUtils

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.ied package

add tag in ExtRefServiceTest

update InputsAdapterTest

update IEDAdapterTest

update DOIAdapterTest

update DataSetAdapterTest

update DAITrackerTest

update ControlBlockAdapterTest

update AccessPointAdapterTest
samirromdhani added a commit that referenced this issue Sep 1, 2023
…os, closes #107, #196, #306

remove TODOs related to isolated test rule: another issue will cover that

update SclRootAdapterTest

update RootSDIAdapterTest & SDIAdapterTest

update LNAdapterTest

refactor(#107, #196, #306): add tag to tests that should be respect isolation principal and best practice

update LN0AdapterTest, LNAdapterTest, SDIAdapterTest..

update test classes in scl.com package

update HeaderAdapterTesT

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.dtt package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update ExtRefServiceTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.sstation package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update class name AbstractDTTLevel to DataTypeTemplateTestUtils

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.ied package

add tag in ExtRefServiceTest

update InputsAdapterTest

update IEDAdapterTest

update DOIAdapterTest

update DataSetAdapterTest

update DAITrackerTest

update ControlBlockAdapterTest

update AccessPointAdapterTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Sep 1, 2023
…os, closes #107, #196, #306

remove TODOs related to isolated test rule: another issue will cover that

update SclRootAdapterTest

update RootSDIAdapterTest & SDIAdapterTest

update LNAdapterTest

refactor(#107, #196, #306): add tag to tests that should be respect isolation principal and best practice

update LN0AdapterTest, LNAdapterTest, SDIAdapterTest..

update test classes in scl.com package

update HeaderAdapterTesT

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.dtt package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update ExtRefServiceTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.sstation package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update class name AbstractDTTLevel to DataTypeTemplateTestUtils

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in scl.ied package

add tag in ExtRefServiceTest

update InputsAdapterTest

update IEDAdapterTest

update DOIAdapterTest

update DataSetAdapterTest

update DAITrackerTest

update ControlBlockAdapterTest

update AccessPointAdapterTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Sep 4, 2023
refactor test code to use AssertJ and using Gherkin to define scenarios

remove TODOs related to isolated test rule: another issue will cover that

update SclRootAdapterTest

update RootSDIAdapterTest & SDIAdapterTest

update LNAdapterTest

refactor(#107, #196, #306): add tag to tests that should be respect isolation principal and best practice

update LN0AdapterTest, LNAdapterTest, SDIAdapterTest..

update test classes in scl.com package

update HeaderAdapterTesT

update test classes in scl.dtt package

update ExtRefServiceTest

update test classes in scl.sstation package

update class name AbstractDTTLevel to DataTypeTemplateTestUtils

update test classes in scl.ied package

add tag in ExtRefServiceTest

update InputsAdapterTest

update IEDAdapterTest

update DOIAdapterTest

update DataSetAdapterTest

update DAITrackerTest

update ControlBlockAdapterTest

update AccessPointAdapterTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

add Tag=issue-321 to tests that should be isolated and respect F(I)RST principles of testing.

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in commons.dto package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in commons.util package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update ObjectReferenceTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update SclElementsProviderServiceTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update sct app module

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update ScdExceptionTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update sct data module

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

sonar review

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test method name

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Sep 6, 2023
refactor test code to use AssertJ and using Gherkin to define scenarios

remove TODOs related to isolated test rule: another issue will cover that

update SclRootAdapterTest

update RootSDIAdapterTest & SDIAdapterTest

update LNAdapterTest

refactor(#107, #196, #306): add tag to tests that should be respect isolation principal and best practice

update LN0AdapterTest, LNAdapterTest, SDIAdapterTest..

update test classes in scl.com package

update HeaderAdapterTesT

update test classes in scl.dtt package

update ExtRefServiceTest

update test classes in scl.sstation package

update class name AbstractDTTLevel to DataTypeTemplateTestUtils

update test classes in scl.ied package

add tag in ExtRefServiceTest

update InputsAdapterTest

update IEDAdapterTest

update DOIAdapterTest

update DataSetAdapterTest

update DAITrackerTest

update ControlBlockAdapterTest

update AccessPointAdapterTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

add Tag=issue-321 to tests that should be isolated and respect F(I)RST principles of testing.

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in commons.dto package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test classes in commons.util package

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update ObjectReferenceTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update SclElementsProviderServiceTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update sct app module

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update ScdExceptionTest

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update sct data module

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

sonar review

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

update test method name

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

refactor tests structure :review

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

refactor tests structure :review - same test name pattern

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>

refactor tests structure: remove unused SclMockedElement class

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Sep 6, 2023
…cture-in-compas-sct

refactor tests structure, closes #107, #196, #306
@samirromdhani samirromdhani mentioned this issue Sep 6, 2023
@samirromdhani samirromdhani self-assigned this Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants