unit test naming convention

Solutions on MaxInterview for unit test naming convention by the best coders in the world

showing results for - "unit test naming convention"
Claudio
23 Jun 2016
1MethodName_StateUnderTest_ExpectedBehavior
2	Example: add_twoPositiveIntegers_returnsTheirSum()
3    Variant: Add_TwoPositiveIntegers_ReturnsTheirSum()
4    Note: This is not camel case, so the question of whether to start each new chunk with a capital is up to you.
5
6MethodName_ExpectedBehavior_StateUnderTest
7	Example: add_returnsTheSum_ofTwoPositiveIntegers()
8    Variant: Add_ReturnsTheSum_OfTwoPositiveIntegers()
9    
10itShouldExpectedBehaviorConnectingWordStateUnderTest
11	Example: itShouldCalculateTheSumOfTwoPositiveIntegers()
12    Variant: testItCalcultesTheSumof..
13
14givenStateUnderTest_whenMethodAction_thenExpectedBehavior
15	Example: givenTwoPostiveIntegers_whenAdded_thenTheyShouldBeSummed
16    Variant: givenTwoPositiveIntegerWhenAddedThenTheyShouldBeSummed() 
queries leading to this page
junit naming conventionstest description convention given when thenjunit test naming conventionstest name conventionunit testing conventionsnaming teststest naming comnaming test convention jestunit test naming convention for exceptionnaming convention for unit test functionunity tests naming convensionunit testing naming conventionunit test function conventionunit testing when should namingjunit5 test method naming conventionspring boot test naming conventionnames for unit test methodsnaming convention for unit teststest naming convention no stateunit test when 2fshould naming conventionnaming convention for test cases in ajvanaming test methods c 23unit testing naming convention c 23unit test name conventionunit testing name conventionunit test naming conventionunit test naming convention javajunit test method nametest cases naming conventionunit test should naming conventionconvention for naming unit test c 23junit test case naming conventionthe tests are all named for the classes being tested unit testunit test naming convention best practiceunit test naming conventionsstandard to name junit test methodsunit test method naming conventionconvetion naming testunit test naming convention c 23nunit test name conventionsunit tests naming convention c 23good test namesunit test namingunit tests naming conventiontest code format conventionhow to name unit tests fileunit tests name conventionnaming a test case in javatest name convention javajava unit test naming conventionnaming convention for unit tests javaunit test naming schemestest naming conventionsnaming unit testsunit test naming convention