Shortener/Shortener/ShortenerTest.class.st

30 lines
835 B
Smalltalk

"
A ShortenerTest is a test class for testing the behavior of Shortener
"
Class {
#name : #ShortenerTest,
#superclass : #TestCase,
#category : #'Shortener-Tests'
}
{ #category : #tests }
ShortenerTest >> testEnlarging [
"I thist that an already shortened address gives the proper result."
| shortenUrl |
shortenUrl := Shortener shorten: 'https://pharo.org'.
self assert: (Shortener enlarge: shortenUrl) equals: 'https://pharo.org'
]
{ #category : #tests }
ShortenerTest >> testIsShortenerUp [
self assert: ((ZnEasy get: 'https://is.gd') isSuccess)
]
{ #category : #tests }
ShortenerTest >> testShortening [
"I thist that an already shortened address gives the proper result."
| shortenUrl |
shortenUrl := Shortener shorten: 'https://pharo.org'.
self assert: (Shortener shorten: 'https://pharo.org') equals: shortenUrl
]