Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/JRPC-Tests/JRPCAbstractServerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ JRPCAbstractServerTest >> tearDown [
super tearDown
]

{ #category : #accessing }
{ #category : #tests }
JRPCAbstractServerTest >> testDefaultPort [

self assert: server defaultPort equals: 4000
]

{ #category : #accessing }
{ #category : #tests }
JRPCAbstractServerTest >> testNotification [

| notificationCount |
Expand All @@ -58,7 +58,7 @@ JRPCAbstractServerTest >> testNotification [
self assert: notificationCount equals: 1
]

{ #category : #accessing }
{ #category : #tests }
JRPCAbstractServerTest >> testNotificationWithInvalidMethod [

| notificationCount |
Expand All @@ -71,7 +71,7 @@ JRPCAbstractServerTest >> testNotificationWithInvalidMethod [
self assert: notificationCount equals: 0
]

{ #category : #accessing }
{ #category : #tests }
JRPCAbstractServerTest >> testRequestOnInvalidEndpoint [

| httpClient failed |
Expand All @@ -90,15 +90,15 @@ JRPCAbstractServerTest >> testRequestOnInvalidEndpoint [
assert: failed
]

{ #category : #accessing }
{ #category : #tests }
JRPCAbstractServerTest >> testRequestWithoutParameters [

server addHandlerNamed: 'zero' block: [ 0 ].

self assert: ( self newJRPCClient callMethod: 'zero' withId: 3 ) result equals: 0
]

{ #category : #accessing }
{ #category : #tests }
JRPCAbstractServerTest >> testValidRequest [

server addHandlerNamed: 'sum' block: [ :a :b | a + b ].
Expand Down
14 changes: 7 additions & 7 deletions src/JRPC-Tests/JRPCMessageProcessorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ Class {
JRPCMessageProcessorTest >> testAddHandler [
| messageProcessor handler |
messageProcessor := JRPCMessageProcessor new.

self assert: messageProcessor handlers size equals: 0.

handler := JRPCBlockHandler new
methodName: 'powerOf2';
block: [ :x | x ** 2 ];
yourself.
methodName: 'powerOf2';
block: [ :x | x ** 2 ];
yourself.
messageProcessor addHandler: handler.

self assert: messageProcessor handlers size equals: 1.
self assert: messageProcessor handlers first == handler.
self assert: messageProcessor handlers first identicalTo: handler
]

{ #category : #test }
Expand Down