Debian Codegraph @

sarif/location_relationship_test.go

raw symbols SCIP
1 package sarif
2
3 import (
4 "testing"
5
6 "github.com/stretchr/testify/assert"
7 )
8
9 func Test_create_new_location_relationship(t *testing.T) {
10 l := NewLocationRelationship(1).
11 WithDescription(
12 NewMessage().
13 WithMarkdown("# markdown text"),
14 ).
15 WithKind("kind").
16 WithKind("another kind")
17
18 assert.Equal(t, `{"target":1,"kinds":["kind","another kind"],"description":{"markdown":"# markdown text"}}`, getJsonString(l))
19 }