|
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 | import { use, should, expect } from 'chai'; |
6 | 6 | import { getNullChannel } from '../testAssets/Fakes'; |
7 | | -import { OmnisharpServerVerboseMessage, EventWithMessage, OmnisharpRequestMessage, OmnisharpServerEnqueueRequest, OmnisharpServerDequeueRequest, OmnisharpServerProcessRequestStart, OmnisharpEventPacketReceived, OmnisharpServerProcessRequestComplete } from '../../../src/omnisharp/loggingEvents'; |
| 7 | +import { OmnisharpServerVerboseMessage, EventWithMessage, OmnisharpRequestMessage, OmnisharpServerEnqueueRequest, OmnisharpServerDequeueRequest, OmnisharpServerProcessRequestStart, OmnisharpEventPacketReceived, OmnisharpServerProcessRequestComplete, OmnisharpServerRequestCancelled } from '../../../src/omnisharp/loggingEvents'; |
8 | 8 | import { OmnisharpDebugModeLoggerObserver } from '../../../src/observers/OmnisharpDebugModeLoggerObserver'; |
9 | 9 |
|
10 | 10 | use(require("chai-string")); |
@@ -33,27 +33,36 @@ suite("OmnisharpDebugModeLoggerObserver", () => { |
33 | 33 | test(`OmnisharpServerEnqueueRequest: Name and Command is logged`, () => { |
34 | 34 | let event = new OmnisharpServerEnqueueRequest("foo", "someCommand"); |
35 | 35 | observer.post(event); |
36 | | - expect(logOutput).to.contain(event.name); |
| 36 | + expect(logOutput).to.contain(event.queueName); |
37 | 37 | expect(logOutput).to.contain(event.command); |
38 | 38 | }); |
39 | 39 |
|
40 | | - test(`OmnisharpServerDequeueRequest: Name and Command is logged`, () => { |
41 | | - let event = new OmnisharpServerDequeueRequest("foo", "someCommand", 1); |
| 40 | + test(`OmnisharpServerDequeueRequest: QueueName, QueueStatus, Command and Id is logged`, () => { |
| 41 | + let event = new OmnisharpServerDequeueRequest("foo", "pending", "someCommand", 1); |
42 | 42 | observer.post(event); |
43 | | - expect(logOutput).to.contain(event.name); |
| 43 | + expect(logOutput).to.contain(event.queueName); |
| 44 | + expect(logOutput).to.contain(event.queueStatus); |
44 | 45 | expect(logOutput).to.contain(event.command); |
45 | 46 | expect(logOutput).to.contain(event.id); |
46 | 47 | }); |
47 | 48 |
|
48 | | - test(`OmnisharpProcessRequestStart: Name is logged`, () => { |
49 | | - let event = new OmnisharpServerProcessRequestStart("foobar"); |
| 49 | + test(`OmnisharpProcessRequestStart: Name and slots is logged`, () => { |
| 50 | + let event = new OmnisharpServerProcessRequestStart("foobar", 2); |
50 | 51 | observer.post(event); |
51 | 52 | expect(logOutput).to.contain(event.name); |
| 53 | + expect(logOutput).to.contain(event.availableRequestSlots); |
| 54 | + }); |
| 55 | + |
| 56 | + test(`OmnisharpServerRequestCancelled: Name and Id is logged`, () => { |
| 57 | + let event = new OmnisharpServerRequestCancelled("foobar", 23); |
| 58 | + observer.post(event); |
| 59 | + expect(logOutput).to.contain(event.command); |
| 60 | + expect(logOutput).to.contain(event.id); |
52 | 61 | }); |
53 | 62 |
|
54 | 63 | test(`OmnisharpServer messages increase and decrease indent`, () => { |
55 | 64 | observer.post(new OmnisharpServerVerboseMessage("!indented_1")); |
56 | | - observer.post(new OmnisharpServerProcessRequestStart("name")); |
| 65 | + observer.post(new OmnisharpServerProcessRequestStart("name", 2)); |
57 | 66 | observer.post(new OmnisharpServerVerboseMessage("indented")); |
58 | 67 | observer.post(new OmnisharpServerProcessRequestComplete()); |
59 | 68 | observer.post(new OmnisharpServerVerboseMessage("!indented_2")); |
|
0 commit comments