Skip to content

Commit

Permalink
Update tests to use the new extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Nov 15, 2018
1 parent 4fcaa1f commit 9d9d013
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
'srcDirectory' : 'source'
}
4 changes: 2 additions & 2 deletions source/RenoirSt-Tests/CssAlphaChannelProvidedTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ CssAlphaChannelProvidedTest >> testCantCreateWithInvalidAlphaValues [
self
should: [ CssAlphaChannelProvided withValue: -1 ]
raise: InstanceCreationFailed
withExceptionDo: [ :error | self assert: error messageText equals: 'The alpha value (-1) must be between zero and one.' ].
withMessageText: 'The alpha value (-1) must be between zero and one.'.

self
should: [ CssAlphaChannelProvided withValue: 2 ]
raise: InstanceCreationFailed
withExceptionDo: [ :error | self assert: error messageText equals: 'The alpha value (2) must be between zero and one.' ].
withMessageText: 'The alpha value (2) must be between zero and one.'.

self should: [ CssAlphaChannelProvided withValue: 0.0 predecessor ] raise: InstanceCreationFailed.

Expand Down
2 changes: 1 addition & 1 deletion source/RenoirSt-Tests/CssIdSelectorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CssIdSelectorTest >> testIdMustBeASymbol [
self
should: [ CssIdSelector for: 'pastoral' over: CssUniversalSelector explicit ]
raise: InstanceCreationFailed
withExceptionDo: [ :error | self assert: error messageText equals: ('<1s> must be a symbol to be considered a valid id' expandMacrosWith: 'pastoral' printString) ]
withMessageText: ('<1s> must be a symbol to be considered a valid id' expandMacrosWith: 'pastoral' printString)
]

{ #category : #Tests }
Expand Down
2 changes: 1 addition & 1 deletion source/RenoirSt-Tests/CssIdentifiedColorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ CssIdentifiedColorTest >> testInvalidInstanceCreationFromHexaNotation [
self
should: [ CssIdentifiedColor fromHexadecimalNotation: #'00' ]
raise: InstanceCreationFailed
withExceptionDo: [ :error | self assert: error messageText equals: 'Invalid hexadecimal notation for a color.' ]
withMessageText: 'Invalid hexadecimal notation for a color.'
]

{ #category : #Tests }
Expand Down
2 changes: 1 addition & 1 deletion source/RenoirSt-Tests/CssMeasureTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ CssMeasureTest >> testInstanceCreation [

unit := CssUnit identifiedBy: 'px'.

self assert: (CssMeasure quantity: 4 unit: unit) printString = '4px'
self assert: (CssMeasure quantity: 4 unit: unit) printString equals: '4px'
]
2 changes: 1 addition & 1 deletion source/RenoirSt-Tests/CssUnitTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CssUnitTest >> testCantCreateWithEmptyIdentifier [
self
should: [ CssUnit identifiedBy: '' ]
raise: InstanceCreationFailed
withExceptionDo: [:error | self assert: error messageText equals: 'A unit identifier can''t be empty']
withMessageText: 'A unit identifier can''t be empty'
]

{ #category : #Tests }
Expand Down

0 comments on commit 9d9d013

Please sign in to comment.