forked from bluematador/gowinlog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
winlog_test.go
46 lines (38 loc) · 1.22 KB
/
winlog_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// +build windows
package winlog
import (
. "testing"
)
func TestWinlogWatcherConfiguresRendering(t *T) {
watcher, err := NewWinLogWatcher()
assertEqual(err, nil, t)
watcher.SetRenderMessage(false)
watcher.SetRenderLevel(false)
watcher.SetRenderTask(false)
watcher.SetRenderProvider(false)
watcher.SetRenderOpcode(false)
watcher.SetRenderChannel(false)
watcher.SetRenderId(false)
assertEqual(watcher.renderMessage, false, t)
assertEqual(watcher.renderLevel, false, t)
assertEqual(watcher.renderTask, false, t)
assertEqual(watcher.renderProvider, false, t)
assertEqual(watcher.renderOpcode, false, t)
assertEqual(watcher.renderChannel, false, t)
assertEqual(watcher.renderId, false, t)
watcher.SetRenderMessage(true)
watcher.SetRenderLevel(true)
watcher.SetRenderTask(true)
watcher.SetRenderProvider(true)
watcher.SetRenderOpcode(true)
watcher.SetRenderChannel(true)
watcher.SetRenderId(true)
assertEqual(watcher.renderMessage, true, t)
assertEqual(watcher.renderLevel, true, t)
assertEqual(watcher.renderTask, true, t)
assertEqual(watcher.renderProvider, true, t)
assertEqual(watcher.renderOpcode, true, t)
assertEqual(watcher.renderChannel, true, t)
assertEqual(watcher.renderId, true, t)
watcher.Shutdown()
}