As of this commit Moq now supports the mocking of delegates, for your situation you would do it like so:
var fooMock = new Mock<Foo>();
var a = new A(fooMock.Object);
Then you can verify the delegate was invoked:
fooMock.Verify(f => f(5), Times.Once);
Or:
fooMock.Verify(f => f(It.IsAny<int>()), Times.Once);