I\'d like to give the background to this question. Skip if you like. For quite a while I\'ve paid close attention to the on going debates on stackoverflow and elsewhere rega
Playing with this and referencing the answers here Setup result for call to extension method it looks like Moq cannot mock static extension methods
I tried to add:
mockSet.Setup(t => t.FirstAsync()).Returns(Task.FromResult(data.First()));
mockSet.Setup(t => t.FirstAsync(It.IsAny>>())).Returns(Task.FromResult(data.First()));
And Moq complains that:
System.NotSupportedException : Expression references a method that does not belong to the mocked object: t => t.FirstAsync()
So it seems there are three options: