Skip to content

Commit

Permalink
Refactoring of code into OpenSmock
Browse files Browse the repository at this point in the history
  • Loading branch information
LabordePierre committed Nov 28, 2023
1 parent 6e0e05a commit 129e8d6
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 553 deletions.
194 changes: 0 additions & 194 deletions GeoView-Tests/GeoGraphicModelTest.class.st

This file was deleted.

2 changes: 1 addition & 1 deletion GeoView-Tests/GeoProjectionModelTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Class {
{ #category : #tests }
GeoProjectionModelTest >> testInitialize [
| model |
model := GeoViewProjectionModel new.
model := GeoViewCUDModel new.
self assert: model projection isNil.
]
2 changes: 1 addition & 1 deletion GeoView-Tests/GeoViewManagerImplTests.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ GeoViewManagerImplTests >> testCreateAndAddGeoObjectLayer [

[layer := geoViewManager createAndAddGeoObjectLayer: nil]
on: Error do: [ :e | error := e ].
self assert: error class equals: GeoViewNoIdError.
self assert: error class equals: SmockNoIdError.

layer := geoViewManager createAndAddGeoObjectLayer: #layerA.
self assert: layer isNil.
Expand Down
4 changes: 2 additions & 2 deletions GeoView-Tests/GeoViewProcessDataTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Class {
GeoViewProcessDataTest >> testInitialize [

| processData |
processData := GeoViewTestProcessData new.
processData := SmockTestProcessData new.

self assert: processData processor isNil.
self assert: processData properties isEmpty.
Expand All @@ -21,7 +21,7 @@ GeoViewProcessDataTest >> testInitialize [
GeoViewProcessDataTest >> testProperty [

| processData |
processData := GeoViewTestProcessData new.
processData := SmockTestProcessData new.

processData setProperty: #toto value: #tata.
self assert: processData properties size equals: 1.
Expand Down
46 changes: 0 additions & 46 deletions GeoView-Tests/GeoViewTestData.class.st

This file was deleted.

23 changes: 0 additions & 23 deletions GeoView-Tests/GeoViewTestProcessData.class.st

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@
I am a Graphic Projection Model
"
Class {
#name : #GeoViewProjectionModel,
#superclass : #GeoViewModel,
#name : #GeoViewCUDModel,
#superclass : #SmockCUDModel,
#instVars : [
'projection'
],
#category : #'GeoView-Model'
}

{ #category : #accessing }
GeoViewProjectionModel >> projection [
GeoViewCUDModel >> projection [

^ projection
]

{ #category : #accessing }
GeoViewProjectionModel >> projection: aMapProjection [
GeoViewCUDModel >> projection: aMapProjection [

projection := aMapProjection
]
5 changes: 0 additions & 5 deletions GeoView/GeoViewDuplicateIdError.class.st

This file was deleted.

2 changes: 1 addition & 1 deletion GeoView/GeoViewError.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Class {
#name : #GeoViewError,
#superclass : #Error,
#superclass : #SmockError,
#category : #'GeoView-Exceptions'
}
4 changes: 2 additions & 2 deletions GeoView/GeoViewManagerImpl.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ GeoViewManagerImpl >> createAndAddGeoObjectLayer: aKey [
"add a layer to the geoplot"

| existingLayer layer |
aKey ifNil:[ GeoViewNoIdError signal: 'Cannot add layer with nil key.'. ^ nil ].
aKey ifNil:[ SmockNoIdError signal: 'Cannot add layer with nil key.'. ^ nil ].

existingLayer := self getLayer: aKey.
existingLayer ifNotNil:[ GeoViewDuplicateIdError signal: 'Cannot add layer with already existing key.'. ^ nil ].
existingLayer ifNotNil:[ SmockDuplicateIdError signal: 'Cannot add layer with already existing key.'. ^ nil ].

layer := self createGeoObjectLayer: aKey.
^self addLayer: layer
Expand Down
Loading

0 comments on commit 129e8d6

Please sign in to comment.