Skip to content
Browse files

define first 'load conflict' test for Issue #1

  • Loading branch information...
1 parent b004d63 commit d01f7986d5f3ac0280b07d290866115af99beba3 Dale Henrichs committed May 29, 2012
View
7 ...sMC.package/MetacelloScriptingConflictsTestCase.class/instance/setUpRepositoryContents.st
@@ -0,0 +1,7 @@
+running
+setUpRepositoryContents
+ super setUpRepositoryContents.
+ self
+ setUpRepositoryContents: #('ConfigurationOfExternalX-dkh.2')
+ sourceRepo: MetacelloScriptingResource current configurationRepository
+ targetRepo: (MCFileTreeRepository new directory: configurationDirectory)
View
3 ...TestsMC.package/MetacelloScriptingConflictsTestCase.class/instance/tearDownPackageList.st
@@ -0,0 +1,3 @@
+running
+tearDownPackageList
+ ^ #('ConfigurationOfExternalX-dkh.2')
View
21 ...tacelloScriptingConflictsTestCase.class/instance/testFileTreeLoadConfigurationVersions.st
@@ -0,0 +1,21 @@
+tests
+testFileTreeLoadConfigurationVersions
+ Metacello new
+ project: 'ExternalX';
+ version: '0.9';
+ repository: 'filetree://' , configurationDirectory fullName;
+ silently;
+ load.
+ self
+ validate: 'ExternalX'
+ registrySize: 1
+ expectedConfigurationVersion: '0.9'
+ expectedConfigurationRepository: 'filetree://' , configurationDirectory fullName
+ expectedBaselineVersion: 'baseline'
+ expectedBaselineRepository: 'dictionary://Metacello_Configuration_Test_Repository'.
+ Metacello new
+ project: 'ExternalX';
+ version: '0.9.1';
+ repository: 'filetree://' , configurationDirectory fullName;
+ silently;
+ load
View
42 ...tsMC.package/MetacelloScriptingResource.class/instance/setUpVersionBaselineOfExternalX.st
@@ -2,42 +2,6 @@ baseline:with:
setUpVersionBaselineOfExternalX
"self reset"
- | reference className definitionArray versionInfo |
- reference := GoferVersionReference name: 'ConfigurationOfExternalX-dkh.1'.
- className := #'ConfigurationOfExternalX'.
- definitionArray := {(MCClassDefinition
- name: className
- superclassName: #'MetacelloBaseConfiguration'
- category: reference packageName
- instVarNames: #()
- comment: '').
- (MCMethodDefinition
- className: className asString
- classIsMeta: false
- selector: 'versionOfX:'
- category: 'cat'
- timeStamp: ''
- source: (self class sourceCodeAt: #'versionOfX:') asString).
- (MCMethodDefinition
- className: className asString
- classIsMeta: false
- selector: 'customProjectAttributes'
- category: 'cat'
- timeStamp: ''
- source: (self class sourceCodeAt: #'customProjectAttributes') asString)}.
- configurationRepository
- basicStoreVersion:
- (MCVersion new
- setPackage: (MetacelloTestsMCPackage new name: reference packageName)
- info:
- (versionInfo := MCVersionInfo
- name: reference name
- id: UUID new
- message: 'This is a mock version'
- date: Date today
- time: Time now
- author: reference author
- ancestors: #())
- snapshot: (MCSnapshot fromDefinitions: definitionArray)
- dependencies: #()).
- ^ versionInfo
+ | versionInfo |
+ versionInfo := self setUpVersionBaselineOfExternalXdkh1.
+ versionInfo := self setUpVersionBaselineOfExternalXdkh2: {versionInfo}
View
43 ....package/MetacelloScriptingResource.class/instance/setUpVersionBaselineOfExternalXdkh1.st
@@ -0,0 +1,43 @@
+baseline:with:
+setUpVersionBaselineOfExternalXdkh1
+ "self reset"
+
+ | reference className definitionArray versionInfo |
+ reference := GoferVersionReference name: 'ConfigurationOfExternalX-dkh.1'.
+ className := #'ConfigurationOfExternalX'.
+ definitionArray := {(MCClassDefinition
+ name: className
+ superclassName: #'MetacelloBaseConfiguration'
+ category: reference packageName
+ instVarNames: #()
+ comment: '').
+ (MCMethodDefinition
+ className: className asString
+ classIsMeta: false
+ selector: 'versionOfX090:'
+ category: 'cat'
+ timeStamp: ''
+ source: (self class sourceCodeAt: #'versionOfX090:') asString).
+ (MCMethodDefinition
+ className: className asString
+ classIsMeta: false
+ selector: 'customProjectAttributes'
+ category: 'cat'
+ timeStamp: ''
+ source: (self class sourceCodeAt: #'customProjectAttributes') asString)}.
+ configurationRepository
+ basicStoreVersion:
+ (MCVersion new
+ setPackage: (MetacelloTestsMCPackage new name: reference packageName)
+ info:
+ (versionInfo := MCVersionInfo
+ name: reference name
+ id: UUID new
+ message: 'This is a mock version'
+ date: Date today
+ time: Time now
+ author: reference author
+ ancestors: #())
+ snapshot: (MCSnapshot fromDefinitions: definitionArray)
+ dependencies: #()).
+ ^ versionInfo
View
51 ...package/MetacelloScriptingResource.class/instance/setUpVersionBaselineOfExternalXdkh2..st
@@ -0,0 +1,51 @@
+baseline:with:
+setUpVersionBaselineOfExternalXdkh2: ancestors
+ "self reset"
+
+ | reference className definitionArray versionInfo |
+ reference := GoferVersionReference name: 'ConfigurationOfExternalX-dkh.2'.
+ self halt.
+ className := #'ConfigurationOfExternalX'.
+ definitionArray := {(MCClassDefinition
+ name: className
+ superclassName: #'MetacelloBaseConfiguration'
+ category: reference packageName
+ instVarNames: #()
+ comment: '').
+ (MCMethodDefinition
+ className: className asString
+ classIsMeta: false
+ selector: 'versionOfX090:'
+ category: 'cat'
+ timeStamp: ''
+ source: (self class sourceCodeAt: #'versionOfX090:') asString).
+ (MCMethodDefinition
+ className: className asString
+ classIsMeta: false
+ selector: 'versionOfX091:'
+ category: 'cat'
+ timeStamp: ''
+ source: (self class sourceCodeAt: #'versionOfX091:') asString).
+ (MCMethodDefinition
+ className: className asString
+ classIsMeta: false
+ selector: 'customProjectAttributes'
+ category: 'cat'
+ timeStamp: ''
+ source: (self class sourceCodeAt: #'customProjectAttributes') asString)}.
+ configurationRepository
+ basicStoreVersion:
+ (MCVersion new
+ setPackage: (MetacelloTestsMCPackage new name: reference packageName)
+ info:
+ (versionInfo := MCVersionInfo
+ name: reference name
+ id: UUID new
+ message: 'This is a mock version'
+ date: Date today
+ time: Time now
+ author: reference author
+ ancestors: ancestors)
+ snapshot: (MCSnapshot fromDefinitions: definitionArray)
+ dependencies: #()).
+ ^ versionInfo
View
4 ...ingResource.class/instance/versionOfX..st → ...Resource.class/instance/versionOfX090..st
@@ -1,11 +1,11 @@
baseline:with:
-versionOfX: spec
+versionOfX090: spec
<version: '0.9'>
spec
for: #'common'
do: [
spec blessing: #'development'.
- spec description: 'MetacelloScriptingResource>>versionOfX:'.
+ spec description: 'MetacelloScriptingResource>>versionOfX090:'.
spec author: 'dkh'.
spec timestamp: '5/4/2012 14:16' ].
spec
View
13 ...ory/Metacello-TestsMC.package/MetacelloScriptingResource.class/instance/versionOfX091..st
@@ -0,0 +1,13 @@
+baseline:with:
+versionOfX091: spec
+ <version: '0.9.1'>
+ spec
+ for: #'common'
+ do: [
+ spec blessing: #'development'.
+ spec description: 'MetacelloScriptingResource>>versionOfX091:'.
+ spec author: 'dkh'.
+ spec timestamp: '5/4/2012 14:16' ].
+ spec
+ for: #'custom'
+ do: [ spec baseline: 'ExternalX' with: [ spec repository: 'dictionary://Metacello_Configuration_Test_Repository' ] ]
View
4 repository/Metacello-TestsMC.package/monticello.meta/version
2 additions, 2 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit d01f798

Please sign in to comment.
Something went wrong with that request. Please try again.