From 9d9d01346879892d2af73847ca10a4688dc33cb4 Mon Sep 17 00:00:00 2001 From: Gabriel Omar Cotelli Date: Thu, 15 Nov 2018 19:01:13 -0300 Subject: [PATCH] Update tests to use the new extensions --- .project | 3 +++ source/RenoirSt-Tests/CssAlphaChannelProvidedTest.class.st | 4 ++-- source/RenoirSt-Tests/CssIdSelectorTest.class.st | 2 +- source/RenoirSt-Tests/CssIdentifiedColorTest.class.st | 2 +- source/RenoirSt-Tests/CssMeasureTest.class.st | 2 +- source/RenoirSt-Tests/CssUnitTest.class.st | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 .project diff --git a/.project b/.project new file mode 100644 index 0000000..6b6d3d7 --- /dev/null +++ b/.project @@ -0,0 +1,3 @@ +{ + 'srcDirectory' : 'source' +} \ No newline at end of file diff --git a/source/RenoirSt-Tests/CssAlphaChannelProvidedTest.class.st b/source/RenoirSt-Tests/CssAlphaChannelProvidedTest.class.st index 85320e1..400e707 100644 --- a/source/RenoirSt-Tests/CssAlphaChannelProvidedTest.class.st +++ b/source/RenoirSt-Tests/CssAlphaChannelProvidedTest.class.st @@ -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. diff --git a/source/RenoirSt-Tests/CssIdSelectorTest.class.st b/source/RenoirSt-Tests/CssIdSelectorTest.class.st index 54dd1c3..4e3c6e6 100644 --- a/source/RenoirSt-Tests/CssIdSelectorTest.class.st +++ b/source/RenoirSt-Tests/CssIdSelectorTest.class.st @@ -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 } diff --git a/source/RenoirSt-Tests/CssIdentifiedColorTest.class.st b/source/RenoirSt-Tests/CssIdentifiedColorTest.class.st index 4d0f2ba..3f60280 100644 --- a/source/RenoirSt-Tests/CssIdentifiedColorTest.class.st +++ b/source/RenoirSt-Tests/CssIdentifiedColorTest.class.st @@ -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 } diff --git a/source/RenoirSt-Tests/CssMeasureTest.class.st b/source/RenoirSt-Tests/CssMeasureTest.class.st index 2efec56..8423c45 100644 --- a/source/RenoirSt-Tests/CssMeasureTest.class.st +++ b/source/RenoirSt-Tests/CssMeasureTest.class.st @@ -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' ] diff --git a/source/RenoirSt-Tests/CssUnitTest.class.st b/source/RenoirSt-Tests/CssUnitTest.class.st index ab3a934..55e64ca 100644 --- a/source/RenoirSt-Tests/CssUnitTest.class.st +++ b/source/RenoirSt-Tests/CssUnitTest.class.st @@ -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 }