Skip to content
This repository was archived by the owner on Dec 26, 2025. It is now read-only.
This repository was archived by the owner on Dec 26, 2025. It is now read-only.

Mock Blazored Modal Instance #598

Description

@Nitesh-bit1991

I am doing unit test using bunit for my Blazored modal. The problem is I cannot mock BlazoredModalInstance as it is contrate class without virtual method. Is there a way to do something like this:

var mockModaInstance = new Mock<BlazoredModalInstance>();
mockModaInstance.Setup(m => m.CloseAsync(It.IsAny<ModalResult>())).Returns(Task.CompletedTask);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions