I have this interface which I am creating XUnit testing.
Task PostMessage(CancellationToken cancellation);
This is my XUnit code
[Fact]
public async Task WhenAValidMessagePosted_ThenReturnStatus20()
{
// Arrange (Seed)
// Act
var result = await _service.PostMessage();
// Assert
}
I have compilation error here in PostMessage(). How do I supply CancellationToken to this method in Xunit?