Skip to content

Commit

Permalink
test: update happy path
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Aug 28, 2024
1 parent 9e2f37e commit bec76dd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pkg/dependency/parser/java/pom/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,27 @@ func TestPom_Parse(t *testing.T) {
},
},
},
{
ID: "org.example:example-test:2.0.0",
Name: "org.example:example-test",
Version: "2.0.0",
Relationship: ftypes.RelationshipDirect,
Dev: true,
Locations: ftypes.Locations{
{
StartLine: 49,
EndLine: 54,
},
},
},
},
wantDeps: []ftypes.Dependency{
{
ID: "com.example:happy:1.0.0",
DependsOn: []string{
"org.example:example-api:1.7.30",
"org.example:example-runtime:1.0.0",
"org.example:example-test:2.0.0",
},
},
},
Expand Down Expand Up @@ -109,13 +123,27 @@ func TestPom_Parse(t *testing.T) {
},
},
},
{
ID: "org.example:example-test:2.0.0",
Name: "org.example:example-test",
Version: "2.0.0",
Relationship: ftypes.RelationshipDirect,
Dev: true,
Locations: ftypes.Locations{
{
StartLine: 49,
EndLine: 54,
},
},
},
},
wantDeps: []ftypes.Dependency{
{
ID: "com.example:happy:1.0.0",
DependsOn: []string{
"org.example:example-api:1.7.30",
"org.example:example-runtime:1.0.0",
"org.example:example-test:2.0.0",
},
},
},
Expand Down
6 changes: 6 additions & 0 deletions pkg/dependency/parser/java/pom/testdata/happy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,11 @@
<version>999</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.example</groupId>
<artifactId>example-test</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

0 comments on commit bec76dd

Please sign in to comment.