github.com/nextlinux/gosbom@v0.81.1-0.20230627115839-1ff50c281391/gosbom/pkg/cataloger/dotnet/cataloger_test.go (about) 1 package dotnet 2 3 import ( 4 "testing" 5 6 "github.com/nextlinux/gosbom/gosbom/pkg/cataloger/internal/pkgtest" 7 ) 8 9 func TestCataloger_Globs(t *testing.T) { 10 tests := []struct { 11 name string 12 fixture string 13 expected []string 14 }{ 15 { 16 name: "obtain deps.json files", 17 fixture: "test-fixtures/glob-paths", 18 expected: []string{ 19 "src/something.deps.json", 20 }, 21 }, 22 } 23 24 for _, test := range tests { 25 t.Run(test.name, func(t *testing.T) { 26 pkgtest.NewCatalogTester(). 27 FromDirectory(t, test.fixture). 28 ExpectsResolverContentQueries(test.expected). 29 TestCataloger(t, NewDotnetDepsCataloger()) 30 }) 31 } 32 }