junit4 - JUnit - invoke a test method without testing it -



junit4 - JUnit - invoke a test method without testing it -

soft ball here. short question you.

suppose have 2 methods

@test public void methoda() {//do something} @test public void methodb() {//do something}

is possible invoke methoda methodb without execute 1 time again test on method a? if not, how can factorize code should tested @ to the lowest degree 1 time (ie methoda shold tested once)? if possible, assertx evaluated again?

extract parts of methodathat should used methodb.

@test public void methoda() { commoncode(); //do } @test public void methodb() { commoncode(); //do } private void commoncode() { //do }

junit junit4

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -