Skip to content

"Expression is not an event add" when using .Raises() #1175

@howcheng

Description

@howcheng

When trying to have a mocked method raise an event, I'm getting the error message "Expression is not an event add". The interface I'm using is a mess of inheritance and new versions of events, so maybe that's related, but here's a fiddle with a stripped-down version where you can see the error happening.

https://dotnetfiddle.net/kqhOln

Did I do something wrong, or is this a bug?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions