| 1 | package sarifscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/ |
| 2 | |
| 3 | import ( |
| 4 | "testingscip-go gomod github.com/golang/go/src go1.16 testing/" |
| 5 | |
| 6 | "github.com/stretchr/testify/assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/" |
| 7 | ) |
| 8 | |
| 9 | func Test_create_new_artifact_locationscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/Test_create_new_artifact_location().(t *testingscip-go gomod github.com/golang/go/src go1.16 testing/.Tscip-go gomod github.com/golang/go/src go1.16 testing/T#) { |
| 10 | al := NewArtifactLocationscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/NewArtifactLocation().(). |
| 11 | WithIndexscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/ArtifactLocation#WithIndex().(0). |
| 12 | WithUriscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/ArtifactLocation#WithUri().("file://broken.go"). |
| 13 | WithUriBaseIdscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/ArtifactLocation#WithUriBaseId().("baseId"). |
| 14 | WithDescriptionscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/ArtifactLocation#WithDescription().(NewMessagescip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/NewMessage().().WithTextscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/Message#WithText().("message text")) |
| 15 | |
| 16 | assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/Equal().(t, `{"uri":"file://broken.go","uriBaseId":"baseId","index":0,"description":{"text":"message text"}}`, getJsonStringscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/getJsonString().(al)) |
| 17 | } |