Idea is not to send the file to actual Azure Blob Storage, instead I want
to Mock with my Test-Route.

Can please anyone share piece of code that how can I write Test for this
particular scenario. I want to know how interceptor work for any case in a
route, like how can we get full control of a route in Tests. I was
struggling this but not able to find any proper solution for Camel-Core
version 2.21.0 supported by RedHat.

On Sun, Jun 14, 2020 at 4:45 PM Rizwan Aslam <[email protected]>
wrote:

> Can anyone help me in Tests.
>
> I want to intercept my route by the help of weave
>
> I want to mock recipientList / toD / to in my route in Tests from the
> following route :
>
> How can I achieve it ? with Advicewith?
>
> Please help / refer any helping material.
>
>
> @Component
> @RequiredArgsConstructor
> public class AzureBlobStorageRoute extends RouteBuilder
> {
>   private final AzureImgUrlSetProcessor azureImgUrlSetProcessor;
>
>   @Value("${azure.storage.container.name}")
>   private String containerName;
>   @Value("${azure.account.name}")
>   private String accountName;
>
>   @Override
>   public void configure() throws Exception
>   {
>     from("direct:uploadImageToAzureBlobStorage")
>             .routeId("uploadImageToAzureBlobStorage")
>             .process(new InitEyeshareAttachmentProcessor())
>             // Inject for Mocking
>             .recipientList(simple("azure-blob://"
>                     + accountName + "/"
>                     + containerName + "/"
>                     + "${exchangeProperty.fileName}"
>                     + 
> "?operation=updateBlockBlob&credentials=#eyeshareCredentials&synchronous=true"))
>             .process(azureImgUrlSetProcessor);
>   }
> }
>
>
> On Sat, Jun 13, 2020 at 6:26 AM Rizwan Aslam <[email protected]>
> wrote:
>
>> Thanks Claus,
>>
>> Can you please provide me any link where I can find source code Tests. Or
>> an example atleast how to reach there.
>>
>> Apart from that. I'm stuck in tge following Tests.
>>
>> Azure Blob Storage Tests legacy version.
>> Amq Redelivery policy and redelivery mapping Tests with embedded broker.
>>
>> Above 2 is also something I'm looking for.
>>
>> Regards,
>> Rizwan
>>
>> On Fri, 12 Jun 2020, 9:52 pm Claus Ibsen, <[email protected]> wrote:
>>
>>> Hi
>>>
>>> A good idea is to look in the source code for the tets of camel-http.
>>> There is likely some SSL tests that has some way of accepting
>>> anything.
>>>
>>> On Fri, Jun 12, 2020 at 3:27 PM Rizwan Aslam <[email protected]>
>>> wrote:
>>> >
>>> > Hi All,
>>> >
>>> > Im new to camel apache.
>>> >
>>> > im using camel 2.21 version i want to accept all hostname verifier in
>>> > camel-http connector not in http4 connector plz guide me or any
>>> example.
>>> > Can i do at url level and also in application.properties
>>> >
>>> > Regards,
>>> > Rizwan
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -----------------
>>> http://davsclaus.com @davsclaus
>>> Camel in Action 2: https://www.manning.com/ibsen2
>>>
>>

Reply via email to