Skip to content

Unit tests for exceptions are failing 'in harmony' (.NET 7) #39

Description

@geertdoornbos

Tests for exceptions are created using InternalMock. It's constructed using:

service.Mock(methodName).Throws(exception)

The InternalMock implementation depends on Harmony to patch private methods.

This patching fails in some situations:

  • running tests in test explorer ('Run') fails
  • running tests using 'dotnet test -c Debug' fails
  • running tests using 'dotnet test -c Release' fails

but, running tests in test explorer ('Debug') succeeds

The cause seems to be originated in MonoMod.Common as mentioned in Harmony issue 504

Waiting for .NET 7 support might not be the way forward pardeike/Harmony#504 (comment)

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