Factorize code
MODIFY
src/PharoLauncher-Tests-Download/PhLJenkins2BuildTest.class.st
src/PharoLauncher-Tests-Download/PhLJenkins2BuildTest.class.st
@@ -6,20 +6,22 @@ Class {
{ #category : #'instance creation' }
PhLJenkins2BuildTest class >> newInstance [
- | job |
- job := PhLJenkins2Build
- newWithProperties: (STONJSON fromString: '{"_class":"hudson.matrix.MatrixBuild","url":"https://ci.inria.fr/moose/job/ClassNamesAnalyzer/223/","number":223}').
- job parent: PhLJenkins2JobTest newInstance.
- ^ job
+ ^ self newWithoutParent
+ parent: PhLJenkins2JobTest newInstance;
+ yourself
+]
+
+{ #category : #'instance creation' }
+PhLJenkins2BuildTest class >> newSecureInstance [
+ ^ self newWithoutParent
+ parent: PhLJenkins2JobTest newSecureInstance;
+ yourself
]
{ #category : #'instance creation' }
-PhLJenkins2BuildTest class >> newSecureJenkinsInstance [
- | job |
- job := PhLJenkins2Build
- newWithProperties: (STONJSON fromString: '{"_class":"hudson.matrix.MatrixBuild","url":"https://ci.inria.fr/moose/job/ClassNamesAnalyzer/223/","number":223}').
- job parent: PhLJenkins2JobTest newSecureJenkinsInstance.
- ^ job
+PhLJenkins2BuildTest class >> newWithoutParent [
+ ^ PhLJenkins2Build newWithProperties: (STONJSON fromString:
+ '{"_class":"hudson.matrix.MatrixBuild","url":"https://ci.inria.fr/moose/job/ClassNamesAnalyzer/223/","number":223}')
]
{ #category : #helpers }
@@ -43,7 +45,7 @@ PhLJenkins2BuildTest >> emptyBuild [
at: 'number' put: self buildNumber;
at: 'url' put: self buildUrlString;
yourself))
- parent: PhLJenkins2JobTest newSecureJenkinsInstance;
+ parent: PhLJenkins2JobTest newSecureInstance;
yourself
]
@@ -53,7 +55,7 @@ PhLJenkins2BuildTest >> emptyLastSuccessfulBuild [
at: 'number' put: self buildNumber;
at: 'url' put: self lastSuccessfulBuildUrlString;
yourself))
- parent: PhLJenkins2JobTest newSecureJenkinsInstance;
+ parent: PhLJenkins2JobTest newSecureInstance;
yourself
]

MODIFY
src/PharoLauncher-Tests-Download/PhLJenkins2EntityTest.class.st
src/PharoLauncher-Tests-Download/PhLJenkins2EntityTest.class.st
@@ -15,7 +15,7 @@ PhLJenkins2EntityTest class >> newInstance [
]
{ #category : #'instance creation' }
-PhLJenkins2EntityTest class >> newSecureJenkinsInstance [
+PhLJenkins2EntityTest class >> newSecureInstance [
^ self subclassResponsibility
]
@@ -39,8 +39,8 @@ PhLJenkins2EntityTest >> newInstance [
]
{ #category : #'instance creation' }
-PhLJenkins2EntityTest >> newSecureJenkinsInstance [
- ^ self class newSecureJenkinsInstance
+PhLJenkins2EntityTest >> newSecureInstance [
+ ^ self class newSecureInstance
]
{ #category : #running }
@@ -69,6 +69,6 @@ PhLJenkins2EntityTest >> testNonSecureJenkinsDoesNotIncludesIdentifiersInUrl [
{ #category : #tests }
PhLJenkins2EntityTest >> testSecureJenkinsIncludesIdentifiersInUrl [
- self assert: self newSecureJenkinsInstance url hasUsername.
- self assert: self newSecureJenkinsInstance url hasPassword
+ self assert: self newSecureInstance url hasUsername.
+ self assert: self newSecureInstance url hasPassword
]

MODIFY
src/PharoLauncher-Tests-Download/PhLJenkins2JobTest.class.st
src/PharoLauncher-Tests-Download/PhLJenkins2JobTest.class.st
@@ -6,20 +6,22 @@ Class {
{ #category : #helpers }
PhLJenkins2JobTest class >> newInstance [
- | job |
- job := PhLJenkins2Job
- newWithProperties: (STONJSON fromString: '{"_class":"hudson.matrix.MatrixBuild","url":"https://ci.inria.fr/pharo-contribution/job/A4BP/1304/","number":1304}').
- job parent: PhLJenkins2ServerTest newInstance.
- ^ job
+ ^ self newWithoutParent
+ parent: PhLJenkins2ServerTest newInstance;
+ yourself
+]
+
+{ #category : #helpers }
+PhLJenkins2JobTest class >> newSecureInstance [
+ ^ self newWithoutParent
+ parent: PhLJenkins2ServerTest newSecureInstance;
+ yourself
]
{ #category : #helpers }
-PhLJenkins2JobTest class >> newSecureJenkinsInstance [
- | job |
- job := PhLJenkins2Job
- newWithProperties: (STONJSON fromString: '{"_class":"hudson.matrix.MatrixBuild","url":"https://ci.inria.fr/pharo-contribution/job/A4BP/1304/","number":1304}').
- job parent: PhLJenkins2ServerTest newSecureJenkinsInstance.
- ^ job
+PhLJenkins2JobTest class >> newWithoutParent [
+ ^ PhLJenkins2Job newWithProperties: (STONJSON fromString:
+ '{"_class":"hudson.matrix.MatrixBuild","url":"https://ci.inria.fr/pharo-contribution/job/A4BP/1304/","number":1304}')
]
{ #category : #helpers }

MODIFY
src/PharoLauncher-Tests-Download/PhLJenkins2RunTest.class.st
src/PharoLauncher-Tests-Download/PhLJenkins2RunTest.class.st
@@ -6,18 +6,20 @@ Class {
{ #category : #'instance creation' }
PhLJenkins2RunTest class >> newInstance [
- | job |
- job := PhLJenkins2Run
- newWithProperties: (STONJSON fromString: '{"url":"https://ci.inria.fr/pharo-contribution/job/MaterialDesignLite/PHARO=61,VERSION=development/1140/","number":1140}').
- job parent: PhLJenkins2BuildTest newInstance.
- ^ job
+ ^ self newWithoutParent
+ parent: PhLJenkins2BuildTest newInstance;
+ yourself
]
{ #category : #'instance creation' }
-PhLJenkins2RunTest class >> newSecureJenkinsInstance [
- | job |
- job := PhLJenkins2Run
- newWithProperties: (STONJSON fromString: '{"url":"https://ci.inria.fr/pharo-contribution/job/MaterialDesignLite/PHARO=61,VERSION=development/1140/","number":1140}').
- job parent: PhLJenkins2BuildTest newSecureJenkinsInstance.
- ^ job
+PhLJenkins2RunTest class >> newSecureInstance [
+ ^ self newWithoutParent
+ parent: PhLJenkins2BuildTest newSecureInstance;
+ yourself
+]
+
+{ #category : #'instance creation' }
+PhLJenkins2RunTest class >> newWithoutParent [
+ ^ PhLJenkins2Run newWithProperties: (STONJSON fromString:
+ '{"url":"https://ci.inria.fr/pharo-contribution/job/MaterialDesignLite/PHARO=61,VERSION=development/1140/","number":1140}')
]

MODIFY
src/PharoLauncher-Tests-Download/PhLJenkins2ServerTest.class.st
src/PharoLauncher-Tests-Download/PhLJenkins2ServerTest.class.st
@@ -10,9 +10,9 @@ PhLJenkins2ServerTest class >> newInstance [
]
{ #category : #'instance creation' }
-PhLJenkins2ServerTest class >> newSecureJenkinsInstance [
+PhLJenkins2ServerTest class >> newSecureInstance [
^ self newInstance
- username: 'Christophe';
+ username: 'BadetitouTheUnicorn';
token: 'dkewjdcnriuwefjncreiuhf';
yourself
]
@@ -39,8 +39,8 @@ PhLJenkins2ServerTest >> newInstance [
]
{ #category : #'instance creation' }
-PhLJenkins2ServerTest >> newSecureJenkinsInstance [
- ^ self class newSecureJenkinsInstance
+PhLJenkins2ServerTest >> newSecureInstance [
+ ^ self class newSecureInstance
]
{ #category : #responses }

Factorize code