| 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_simple_artifact_changescip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/Test_create_simple_artifact_change().(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 | |
| 11 | ac := NewArtifactChangescip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/NewArtifactChange().(NewArtifactLocationscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/NewArtifactLocation().(). |
| 12 | WithIndexscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/ArtifactLocation#WithIndex().(0). |
| 13 | WithUriscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/ArtifactLocation#WithUri().("file://broken.go"). |
| 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 | ac.WithReplacementscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/ArtifactChange#WithReplacement().( |
| 17 | NewReplacementscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/NewReplacement().( |
| 18 | NewRegionscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/NewRegion().(). |
| 19 | WithSnippetscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/Region#WithSnippet().(NewArtifactContentscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/NewArtifactContent().().WithTextscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/ArtifactContent#WithText().("file://broken.go")). |
| 20 | WithStartLinescip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/Region#WithStartLine().(1). |
| 21 | WithEndLinescip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/Region#WithEndLine().(10), |
| 22 | ), |
| 23 | ) |
| 24 | |
| 25 | 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, `{"artifactLocation":{"uri":"file://broken.go","index":0,"description":{"text":"message text"}},"replacements":[{"deletedRegion":{"startLine":1,"endLine":10,"snippet":{"text":"file://broken.go"}}}]}`, getJsonStringscip-go gomod github.com/owenrumney/go-sarif . `github.com/owenrumney/go-sarif/sarif`/getJsonString().(ac)) |
| 26 | } |