Giter Club home page Giter Club logo

Comments (5)

akudiyar avatar akudiyar commented on July 28, 2024

Thank you for the proposal!

I suggest using only test_ for method prefixes instead of some names, the test method name already includes the "shouldSomething" part which describes it.

from cartridge-springdata.

wey1and avatar wey1and commented on July 28, 2024

Thank you for the proposal!

I suggest using only test_ for method prefixes instead of some names, the test method name already includes the "shouldSomething" part which describes it.

Done

from cartridge-springdata.

vrogach2020 avatar vrogach2020 commented on July 28, 2024

I'll try to finalize the agreement:

1 Name of test method must not violate linter rules and
generate compiler warnings (must not contain special characters, be longer than 120 chars etc).

2 These points of testcase must be readable and simple:

  • test object (class, method)
  • action (input)
  • expected reaction of system (output)

It's good when they can be included into test method name but it's not always possible.
When the description is too large then testcase should contain a comment on points mentioned above.

3 Do not perform a total refactoring of existing codebase.
Just leave the code better than it was after making changes.

from cartridge-springdata.

vrogach2020 avatar vrogach2020 commented on July 28, 2024

Also maybe use this pattern ?

@akudiyar @wey1and

test_[method]_when[condition]_then[reaction]
For example:
test_helloWorld_whenCalled_ThenPrintHelloWorld()

instead of this

test_[methodName/scenarioName]_should[Action]_if[Condition]

[methodName/scenarioName]_ - is optional.
if[Condition] - is optional. You can omit this if the execution is straightforward.

from cartridge-springdata.

wey1and avatar wey1and commented on July 28, 2024

Thanks to all!
Based on the discussion, I brought the initial version to the final one.

from cartridge-springdata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.