(t *testing.T)
| 155 | } |
| 156 | |
| 157 | func TestJavaReplaceURI(t *testing.T) { |
| 158 | inspector := newTestJavaSourceInspector(t) |
| 159 | |
| 160 | sourceSpec := &v1.SourceSpec{ |
| 161 | DataSpec: v1.DataSpec{ |
| 162 | Name: "test.java", |
| 163 | Content: "from(\"quartz:trigger?cron=0 0/1 * * * ?\").to(\"log:info\")", |
| 164 | }, |
| 165 | } |
| 166 | replaced, err := inspector.ReplaceFromURI( |
| 167 | sourceSpec, |
| 168 | "direct:newURI?hello=world", |
| 169 | ) |
| 170 | assert.Nil(t, err) |
| 171 | assert.True(t, replaced) |
| 172 | assert.Equal(t, "from(\"direct:newURI?hello=world\").to(\"log:info\")", sourceSpec.Content) |
| 173 | } |
| 174 | |
| 175 | func TestJavaReplaceMultiURI(t *testing.T) { |
| 176 | inspector := newTestJavaSourceInspector(t) |
nothing calls this directly
no test coverage detected