mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Remove generic gitUtils from BasePiperTest
there is only one test class making use of it left. This test class is the GitUtilsTest itself. Hence moving this member downwards in the test class hierarchy into GitUtilsTest. I doubt it makes sense to make use of a generic git utils mock somewhere else since this basically means to test the GitUtils class in the conxtext of other examinees. For that there is no need. The GitUtils class should be tested by the corresponding test class, but not in a transive manner by other tests. For all other tests a specific git utils mock should be provided mocking the corresponding method class. This is already the case today, otherwise we would have more test classes making use of the generic git utils mock.
This commit is contained in:
parent
7f171429bc
commit
dc9ce9a732
@ -19,8 +19,13 @@ import static org.junit.Assert.assertNotNull
|
||||
import static org.junit.Assert.assertNull
|
||||
import static org.junit.Assert.assertThat
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
|
||||
class GitUtilsTest extends BasePiperTest {
|
||||
|
||||
@Autowired
|
||||
GitUtils gitUtils
|
||||
|
||||
JenkinsShellCallRule jscr = new JenkinsShellCallRule(this)
|
||||
ExpectedException thrown = ExpectedException.none()
|
||||
|
||||
|
@ -20,9 +20,6 @@ abstract class BasePiperTest extends BasePipelineTest {
|
||||
@Autowired
|
||||
Script nullScript
|
||||
|
||||
@Autowired
|
||||
GitUtils gitUtils
|
||||
|
||||
@Autowired
|
||||
Utils utils
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user