I am trying to create Xunit test for azure timer triggered functions and I have to pass the service bus client queue in Run method and I cannot mock a service bus queue and not sure how to pass as a parameter
Below is my azure function
[FunctionName("TimerJob")]
public static async Task Run([TimerTrigger("%TimerJobExpression%")] TimerInfo myTimer,
[ServiceBus("%Queue1%", Connection = "ServiceBusConnection")] IAsyncCollector<string> Queue1,
[ServiceBus("%Queue2%", Connection = "ServiceBusConnection")] IAsyncCollector<string> Queue2,
ILogger log)
{
//logic
}
Below is the test method I am trying to create
[Fact]
public async Task Run_Queue()
{
var param1 = default(TimerInfo);
var result = await ProducerClientTimerJob.Run(param1, null, null, logger);
}