MCPcopy Create free account
hub / github.com/apache/camel-k / TestJavaRestOpenapiFirst

Function TestJavaRestOpenapiFirst

pkg/util/source/inspector_java_source_test.go:193–210  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

191}
192
193func TestJavaRestOpenapiFirst(t *testing.T) {
194 inspector := newTestJavaSourceInspector(t)
195
196 sourceSpec := v1.SourceSpec{
197 DataSpec: v1.DataSpec{
198 Name: "test.java",
199 Content: `
200public void configure() throws Exception {
201 rest().openApi("petstore-v3.json");
202}
203 `,
204 },
205 }
206 meta := NewMetadata()
207 err := inspector.Extract(sourceSpec, &meta)
208 require.NoError(t, err)
209 assert.Contains(t, meta.Dependencies.List(), "camel:rest-openapi")
210}
211
212func TestJavaBeanDependencies(t *testing.T) {
213 inspector := newTestJavaSourceInspector(t)

Callers

nothing calls this directly

Calls 5

NewMetadataFunction · 0.85
ContainsMethod · 0.80
ExtractMethod · 0.65
ListMethod · 0.65

Tested by

no test coverage detected