Skip to content

Commit

Permalink
🔧 update assertion log name on ZnEventToLogRecordControllerTest
Browse files Browse the repository at this point in the history
  • Loading branch information
mreyes committed Jun 28, 2024
1 parent abb6edc commit 309589c
Show file tree
Hide file tree
Showing 23 changed files with 228 additions and 267 deletions.
29 changes: 14 additions & 15 deletions source/Hyperspace-Model-Tests/AbstractCURIETest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@
An AbstractCURIETest is a test class for testing the behavior of AbstractCURIE
"
Class {
#name : 'AbstractCURIETest',
#superclass : 'TestCase',
#category : 'Hyperspace-Model-Tests',
#package : 'Hyperspace-Model-Tests'
#name : #AbstractCURIETest,
#superclass : #TestCase,
#category : 'Hyperspace-Model-Tests'
}

{ #category : 'testing' }
{ #category : #testing }
AbstractCURIETest class >> isAbstract [

^ self = AbstractCURIETest
]

{ #category : 'private' }
{ #category : #private }
AbstractCURIETest >> curieClass [

^ self subclassResponsibility
]

{ #category : 'tests' }
{ #category : #tests }
AbstractCURIETest >> testAccessing [

| curie |
Expand All @@ -38,15 +37,15 @@ AbstractCURIETest >> testAccessing [
assertUrl: curie relativeReference equals: 'Person#legal' asUrl
]

{ #category : 'tests' }
{ #category : #tests }
AbstractCURIETest >> testAsWebLink [

| curie |
curie := self curieClass prefixedBy: 'users' referencing: 'octocat' asUrl.
self assert: curie asWebLink equals: ( WebLink to: curie )
]

{ #category : 'tests' }
{ #category : #tests }
AbstractCURIETest >> testCantCreateWithAbsoluteReference [

self
Expand All @@ -55,7 +54,7 @@ AbstractCURIETest >> testCantCreateWithAbsoluteReference [
withMessageText: 'https://google.com/ must be a relative reference'
]

{ #category : 'tests' }
{ #category : #tests }
AbstractCURIETest >> testCantCreateWithEmptyPrefix [

self
Expand All @@ -64,7 +63,7 @@ AbstractCURIETest >> testCantCreateWithEmptyPrefix [
withMessageText: 'A CURIE prefix cannot be empty'
]

{ #category : 'tests' }
{ #category : #tests }
AbstractCURIETest >> testCantExpandToURIInContext [

| curie |
Expand All @@ -76,7 +75,7 @@ AbstractCURIETest >> testCantExpandToURIInContext [
withMessageText: 'Missing namespace "users"'
]

{ #category : 'tests' }
{ #category : #tests }
AbstractCURIETest >> testCantExpandToURIInContextRecursiverly [

| userCurie usersCurie context |
Expand All @@ -91,7 +90,7 @@ AbstractCURIETest >> testCantExpandToURIInContextRecursiverly [
withMessageText: 'Missing namespace "api"'
]

{ #category : 'tests' }
{ #category : #tests }
AbstractCURIETest >> testComparing [

| curie |
Expand All @@ -107,7 +106,7 @@ AbstractCURIETest >> testComparing [
deny: curie equals: ( self curieClass prefixedBy: 'orgs' referencing: 'octocat' asUrl )
]

{ #category : 'tests' }
{ #category : #tests }
AbstractCURIETest >> testExpandToURIInContext [

| curie context |
Expand All @@ -120,7 +119,7 @@ AbstractCURIETest >> testExpandToURIInContext [
equals: 'https://api.github.com/users/octocat' asUrl
]

{ #category : 'tests' }
{ #category : #tests }
AbstractCURIETest >> testExpandToURIInContextRecursively [

| usersCurie userCurie context |
Expand Down
17 changes: 8 additions & 9 deletions source/Hyperspace-Model-Tests/CURIETest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@
A CompactURITest is a test class for testing the behavior of CompactURI
"
Class {
#name : 'CURIETest',
#superclass : 'AbstractCURIETest',
#category : 'Hyperspace-Model-Tests',
#package : 'Hyperspace-Model-Tests'
#name : #CURIETest,
#superclass : #AbstractCURIETest,
#category : 'Hyperspace-Model-Tests'
}

{ #category : 'private' }
{ #category : #private }
CURIETest >> curieClass [

^ CURIE
]

{ #category : 'tests' }
{ #category : #tests }
CURIETest >> testAsSafeCURIE [

self
assert: ( self curieClass fromString: 'users:octocat' ) asSafeCURIE printString
equals: '[users:octocat]'
]

{ #category : 'tests' }
{ #category : #tests }
CURIETest >> testFromString [

| curie |
Expand All @@ -33,7 +32,7 @@ CURIETest >> testFromString [
assertUrl: curie relativeReference equals: 'octocat' asUrl / 'tokens'
]

{ #category : 'tests' }
{ #category : #tests }
CURIETest >> testParsingErrors [

self
Expand All @@ -51,7 +50,7 @@ CURIETest >> testParsingErrors [
withMessageText: 'Cannot create a CURIE from "users"'
]

{ #category : 'tests' }
{ #category : #tests }
CURIETest >> testPrinting [

| curie curieWithPath curieWithFragment |
Expand Down
20 changes: 9 additions & 11 deletions source/Hyperspace-Model-Tests/EntityTagTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,27 @@
I'm a test case for EntityTag
"
Class {
#name : 'EntityTagTest',
#superclass : 'TestCase',
#category : 'Hyperspace-Model-Tests-IETF',
#package : 'Hyperspace-Model-Tests',
#tag : 'IETF'
#name : #EntityTagTest,
#superclass : #TestCase,
#category : 'Hyperspace-Model-Tests-IETF'
}

{ #category : 'tests' }
{ #category : #tests }
EntityTagTest >> testAsEntityTag [

self
assert: '"12345"' asEntityTag equals: (EntityTag fromString: '"12345"');
assert: (EntityTag fromString: '"12345"') asEntityTag equals: (EntityTag fromString: '"12345"')
]

{ #category : 'tests' }
{ #category : #tests }
EntityTagTest >> testAsString [

self assert: (EntityTag with: '12345') asString equals: '"12345"'.
self assert: (EntityTag weakWith: '12345') asString equals: 'W/"12345"'.
]

{ #category : 'tests' }
{ #category : #tests }
EntityTagTest >> testCaseSensitiveWeakEntityTagCreation [

self
Expand All @@ -33,7 +31,7 @@ EntityTagTest >> testCaseSensitiveWeakEntityTagCreation [
raise: InstanceCreationFailed
]

{ #category : 'tests' }
{ #category : #tests }
EntityTagTest >> testFromString [

self
Expand All @@ -51,7 +49,7 @@ EntityTagTest >> testFromString [
should: [ EntityTag fromString: 'w/"1"' ] raise: InstanceCreationFailed
]

{ #category : 'tests' }
{ #category : #tests }
EntityTagTest >> testHash [

self
Expand All @@ -62,7 +60,7 @@ EntityTagTest >> testHash [
equals: (EntityTag fromString: 'W/"12345"') hash
]

{ #category : 'tests' }
{ #category : #tests }
EntityTagTest >> testPrinting [

self assert: (EntityTag with: '12345') printString equals: '"12345"'.
Expand Down
32 changes: 15 additions & 17 deletions source/Hyperspace-Model-Tests/HTTPClientErrorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
A HTTPClientErrorTest is a test class for testing the behavior of HTTPClientError
"
Class {
#name : 'HTTPClientErrorTest',
#superclass : 'TestCase',
#category : 'Hyperspace-Model-Tests-Exceptions',
#package : 'Hyperspace-Model-Tests',
#tag : 'Exceptions'
#name : #HTTPClientErrorTest,
#superclass : #TestCase,
#category : 'Hyperspace-Model-Tests-Exceptions'
}

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testBadRequest [

self
Expand All @@ -23,7 +21,7 @@ HTTPClientErrorTest >> testBadRequest [
]
]

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testConflict [

self
Expand All @@ -37,7 +35,7 @@ HTTPClientErrorTest >> testConflict [
]
]

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testConvenienceHandler [

self
Expand All @@ -50,7 +48,7 @@ HTTPClientErrorTest >> testConvenienceHandler [
]
]

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testConvenienceHandlerUsingAnotherSignal [

self
Expand All @@ -66,7 +64,7 @@ HTTPClientErrorTest >> testConvenienceHandlerUsingAnotherSignal [
]
]

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testConvenienceHandlerWithOnExceptDo [

self
Expand All @@ -83,7 +81,7 @@ HTTPClientErrorTest >> testConvenienceHandlerWithOnExceptDo [
]
]

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testNotFound [

self
Expand All @@ -106,7 +104,7 @@ HTTPClientErrorTest >> testNotFound [
]
]

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testPreconditionFailed [

self
Expand All @@ -120,7 +118,7 @@ HTTPClientErrorTest >> testPreconditionFailed [
]
]

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testPreconditionRequired [

self
Expand All @@ -134,7 +132,7 @@ HTTPClientErrorTest >> testPreconditionRequired [
]
]

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testSignalingCustomCode [

self
Expand All @@ -153,7 +151,7 @@ HTTPClientErrorTest >> testSignalingCustomCode [
]
]

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testTooManyRequests [

self
Expand All @@ -167,7 +165,7 @@ HTTPClientErrorTest >> testTooManyRequests [
]
]

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testUnprocessableEntity [

self
Expand All @@ -181,7 +179,7 @@ HTTPClientErrorTest >> testUnprocessableEntity [
]
]

{ #category : 'tests' }
{ #category : #tests }
HTTPClientErrorTest >> testUnsupportedMediaType [

self
Expand Down
14 changes: 6 additions & 8 deletions source/Hyperspace-Model-Tests/HTTPErrorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
A HTTPErrorTest is a test class for testing the behavior of HTTPError
"
Class {
#name : 'HTTPErrorTest',
#superclass : 'TestCase',
#category : 'Hyperspace-Model-Tests-Exceptions',
#package : 'Hyperspace-Model-Tests',
#tag : 'Exceptions'
#name : #HTTPErrorTest,
#superclass : #TestCase,
#category : 'Hyperspace-Model-Tests-Exceptions'
}

{ #category : 'tests' }
{ #category : #tests }
HTTPErrorTest >> testHandlingExceptionSelectorSets [

self
Expand All @@ -26,13 +24,13 @@ HTTPErrorTest >> testHandlingExceptionSelectorSets [
raise: HTTPServerError serviceUnavailable
]

{ #category : 'tests' }
{ #category : #tests }
HTTPErrorTest >> testHandlingHTTPClientError [

self should: [ HTTPClientError notFound signal ] raise: HTTPError
]

{ #category : 'tests' }
{ #category : #tests }
HTTPErrorTest >> testHandlingHTTPServerError [

self should: [ HTTPServerError internalServerError signal ] raise: HTTPError
Expand Down
10 changes: 4 additions & 6 deletions source/Hyperspace-Model-Tests/HTTPNotAcceptableTest.class.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
Class {
#name : 'HTTPNotAcceptableTest',
#superclass : 'TestCase',
#category : 'Hyperspace-Model-Tests-Exceptions',
#package : 'Hyperspace-Model-Tests',
#tag : 'Exceptions'
#name : #HTTPNotAcceptableTest,
#superclass : #TestCase,
#category : 'Hyperspace-Model-Tests-Exceptions'
}

{ #category : 'tests' }
{ #category : #tests }
HTTPNotAcceptableTest >> testSignaling [

self
Expand Down
Loading

0 comments on commit 309589c

Please sign in to comment.