How to Mock DialogService?


I am trying to write Bunit test by mocking the DialogService Confirm event that returns true but it is not possible to override the event because it is not overridable. Is there a way to work with it?

what i thought i would do something like this

_dialogservice.Setup(x => x.Confirm("", "", null)).ReturnsAsync(true);

At the moment the confirm method is not virtual and cannot be overridden.