Skip to content

Commit

Permalink
Rename test classes to exactly match the surfaces names (better for t…
Browse files Browse the repository at this point in the history
…ools)
  • Loading branch information
tinchodias committed Jul 28, 2020
1 parent 86cea43 commit 053ac6d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 33 deletions.
@@ -1,5 +1,5 @@
Class {
#name : #AthensCairoSurfaceExportTest,
#name : #AthensCairoExportSurfaceTest,
#superclass : #TestCase,
#instVars : [
'surface'
Expand All @@ -8,48 +8,48 @@ Class {
}

{ #category : #testing }
AthensCairoSurfaceExportTest class >> isAbstract [
^ self = AthensCairoSurfaceExportTest
AthensCairoExportSurfaceTest class >> isAbstract [
^ self = AthensCairoExportSurfaceTest
]

{ #category : #tests }
AthensCairoSurfaceExportTest >> athensSurfaceClass [
AthensCairoExportSurfaceTest >> athensSurfaceClass [
^ self subclassResponsibility
]

{ #category : #running }
AthensCairoSurfaceExportTest >> fileName [
AthensCairoExportSurfaceTest >> fileName [
^ self className asString
]

{ #category : #running }
AthensCairoSurfaceExportTest >> fileReference [
AthensCairoExportSurfaceTest >> fileReference [
^ self fileName asFileReference
]

{ #category : #tests }
AthensCairoSurfaceExportTest >> flushExportFile [
AthensCairoExportSurfaceTest >> flushExportFile [
"This triggers call to destroy functions (the garbage collector will do it via finalize)"

surface := nil.
Smalltalk garbageCollect
]

{ #category : #running }
AthensCairoSurfaceExportTest >> setUp [
AthensCairoExportSurfaceTest >> setUp [
super setUp.
self fileReference ensureDelete
]

{ #category : #running }
AthensCairoSurfaceExportTest >> tearDown [
AthensCairoExportSurfaceTest >> tearDown [
self flushExportFile.
self fileReference ensureDelete.
super tearDown.
]

{ #category : #tests }
AthensCairoSurfaceExportTest >> testExportBoxes [
AthensCairoExportSurfaceTest >> testExportBoxes [
| path |
surface := self athensSurfaceClass
extent: 100@100
Expand Down Expand Up @@ -79,23 +79,23 @@ AthensCairoSurfaceExportTest >> testExportBoxes [
]

{ #category : #tests }
AthensCairoSurfaceExportTest >> testExtent [
AthensCairoExportSurfaceTest >> testExtent [
surface := self athensSurfaceClass
extent: 100@50
fileName: self fileName.
self assert: surface extent equals: 100@50
]

{ #category : #tests }
AthensCairoSurfaceExportTest >> testHeight [
AthensCairoExportSurfaceTest >> testHeight [
surface := self athensSurfaceClass
extent: 100@50
fileName: self fileName.
self assert: surface height equals: 50
]

{ #category : #tests }
AthensCairoSurfaceExportTest >> testWidth [
AthensCairoExportSurfaceTest >> testWidth [
surface := self athensSurfaceClass
extent: 100@50
fileName: self fileName.
Expand Down
10 changes: 0 additions & 10 deletions src/Athens-Cairo-Tests/AthensCairoPDFSurfaceExportTest.class.st

This file was deleted.

10 changes: 10 additions & 0 deletions src/Athens-Cairo-Tests/AthensCairoPDFSurfaceTest.class.st
@@ -0,0 +1,10 @@
Class {
#name : #AthensCairoPDFSurfaceTest,
#superclass : #AthensCairoExportSurfaceTest,
#category : #'Athens-Cairo-Tests-Core'
}

{ #category : #tests }
AthensCairoPDFSurfaceTest >> athensSurfaceClass [
^ AthensCairoPDFSurface
]
10 changes: 0 additions & 10 deletions src/Athens-Cairo-Tests/AthensCairoSVGSurfaceExportTest.class.st

This file was deleted.

10 changes: 10 additions & 0 deletions src/Athens-Cairo-Tests/AthensCairoSVGSurfaceTest.class.st
@@ -0,0 +1,10 @@
Class {
#name : #AthensCairoSVGSurfaceTest,
#superclass : #AthensCairoExportSurfaceTest,
#category : #'Athens-Cairo-Tests-Core'
}

{ #category : #tests }
AthensCairoSVGSurfaceTest >> athensSurfaceClass [
^ AthensCairoSVGSurface
]

0 comments on commit 053ac6d

Please sign in to comment.