(t *testing.T)
| 115 | ` |
| 116 | |
| 117 | func TestJavaSourceDataFormat(t *testing.T) { |
| 118 | tc := []struct { |
| 119 | source string |
| 120 | deps []string |
| 121 | }{ |
| 122 | { |
| 123 | source: javaSourceJSONEip, |
| 124 | deps: []string{"camel:jackson"}, |
| 125 | }, |
| 126 | { |
| 127 | source: javaSourceJSONJacksonEip, |
| 128 | deps: []string{"camel:jackson"}, |
| 129 | }, |
| 130 | { |
| 131 | source: javaSourceAvroEndpoint, |
| 132 | deps: []string{"camel:dataformat", "camel:avro"}, |
| 133 | }, |
| 134 | { |
| 135 | source: javaSourceJacksonEndpoint, |
| 136 | deps: []string{"camel:dataformat", "camel:jackson"}, |
| 137 | }, |
| 138 | { |
| 139 | source: javaSourceProtobufEndpoint, |
| 140 | deps: []string{"camel:dataformat", "camel:protobuf"}, |
| 141 | }, |
| 142 | } |
| 143 | |
| 144 | inspector := newTestJavaSourceInspector(t) |
| 145 | for i := range tc { |
| 146 | test := tc[i] |
| 147 | t.Run(fmt.Sprintf("TestJavaSourceDataFormat-%d", i), func(t *testing.T) { |
| 148 | assertExtract(t, inspector, test.source, func(meta *Metadata) { |
| 149 | for _, d := range test.deps { |
| 150 | assert.Contains(t, meta.Dependencies.List(), d) |
| 151 | } |
| 152 | }) |
| 153 | }) |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | func TestJavaReplaceURI(t *testing.T) { |
| 158 | inspector := newTestJavaSourceInspector(t) |
nothing calls this directly
no test coverage detected