diff --git a/repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/README.md b/repository/Zinc-Tests.package/ZnLogEventTest.class/README.md similarity index 100% rename from repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/README.md rename to repository/Zinc-Tests.package/ZnLogEventTest.class/README.md diff --git a/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/clientId.st b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/clientId.st new file mode 100644 index 00000000..5b1b3294 --- /dev/null +++ b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/clientId.st @@ -0,0 +1,3 @@ +accessing +clientId + ^ 'client-1' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/request.st b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/request.st new file mode 100644 index 00000000..68a70279 --- /dev/null +++ b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/request.st @@ -0,0 +1,3 @@ +accessing +request + ^ ZnRequest get: 'http://foo.com/test' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/response.st b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/response.st new file mode 100644 index 00000000..96dad840 --- /dev/null +++ b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/response.st @@ -0,0 +1,3 @@ +accessing +response + ^ ZnResponse ok: (ZnEntity text: 'OK') \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/serverId.st b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/serverId.st new file mode 100644 index 00000000..ff3bd934 --- /dev/null +++ b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/serverId.st @@ -0,0 +1,3 @@ +accessing +serverId + ^ 'server-1' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testClientTransactionEvent.st b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testClientTransactionEvent.st new file mode 100644 index 00000000..c255255a --- /dev/null +++ b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testClientTransactionEvent.st @@ -0,0 +1,19 @@ +testing +testClientTransactionEvent + | event | + (event := ZnClientTransactionEvent new) + clientId: self clientId; + request: self request; + response: self response; + requestDuration: self timing requestDuration; + responseDuration: self timing responseDuration. + self assert: event id isInteger. + self assert: event processId isInteger. + self assert: event timestamp <= DateAndTime now. + self assert: event clientId equals: self clientId. + self assert: event request uri equals: self request uri. + self assert: event request method equals: self request method. + self assert: event response code equals: self response code. + self assert: event duration equals: self timing requestDuration + self timing responseDuration. + self assert: event printString isString. + ^ event \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testServerTransactionEvent.st b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testServerTransactionEvent.st new file mode 100644 index 00000000..eb8c430d --- /dev/null +++ b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testServerTransactionEvent.st @@ -0,0 +1,18 @@ +testing +testServerTransactionEvent + | event | + (event := ZnServerTransactionEvent new) + serverId: self serverId; + request: self request; + response: self response; + timing: self timing. + self assert: event id isInteger. + self assert: event processId isInteger. + self assert: event timestamp <= DateAndTime now. + self assert: event serverId equals: self serverId. + self assert: event request uri equals: self request uri. + self assert: event request method equals: self request method. + self assert: event response code equals: self response code. + self assert: event duration equals: self timing totalDuration. + self assert: event printString isString. + ^ event \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testSimplifiedClientTransactionEvent.st b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testSimplifiedClientTransactionEvent.st new file mode 100644 index 00000000..752fc81d --- /dev/null +++ b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testSimplifiedClientTransactionEvent.st @@ -0,0 +1,20 @@ +testing +testSimplifiedClientTransactionEvent + | event | + (event := ZnSimplifiedClientTransactionEvent new) + clientId: self clientId; + request: self request; + response: self response; + requestDuration: self timing requestDuration; + responseDuration: self timing responseDuration. + self assert: event id isInteger. + self assert: event processId isInteger. + self assert: event timestamp <= DateAndTime now. + self assert: event clientId equals: self clientId. + self assert: event url equals: self request uri. + self assert: event method equals: self request method. + self assert: event responseCode equals: self response code. + self assert: event size equals: self response contentLength. + self assert: event duration equals: self timing requestDuration + self timing responseDuration. + self assert: event printString isString. + ^ event \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testSimplifiedServerTransactionEvent.st b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testSimplifiedServerTransactionEvent.st new file mode 100644 index 00000000..82434f4e --- /dev/null +++ b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/testSimplifiedServerTransactionEvent.st @@ -0,0 +1,19 @@ +testing +testSimplifiedServerTransactionEvent + | event | + (event := ZnSimplifiedServerTransactionEvent new) + serverId: self serverId; + request: self request; + response: self response; + timing: self timing. + self assert: event id isInteger. + self assert: event processId isInteger. + self assert: event timestamp <= DateAndTime now. + self assert: event serverId equals: self serverId. + self assert: event url equals: self request uri. + self assert: event method equals: self request method. + self assert: event responseCode equals: self response code. + self assert: event size equals: self response contentLength. + self assert: event duration equals: self timing totalDuration. + self assert: event printString isString. + ^ event \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/timing.st b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/timing.st new file mode 100644 index 00000000..1f3d66ef --- /dev/null +++ b/repository/Zinc-Tests.package/ZnLogEventTest.class/instance/timing.st @@ -0,0 +1,6 @@ +accessing +timing + ^ ZnServerTransactionTiming new + requestDuration: 1; + responseDuration: 2; + yourself \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/properties.json b/repository/Zinc-Tests.package/ZnLogEventTest.class/properties.json similarity index 82% rename from repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/properties.json rename to repository/Zinc-Tests.package/ZnLogEventTest.class/properties.json index 253ca76c..5963600b 100644 --- a/repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/properties.json +++ b/repository/Zinc-Tests.package/ZnLogEventTest.class/properties.json @@ -6,6 +6,6 @@ "pools" : [ ], "classvars" : [ ], "instvars" : [ ], - "name" : "ZnUnixSocketClientTest", + "name" : "ZnLogEventTest", "type" : "normal" } \ No newline at end of file