Encountering System.ArgumentException: Unable to create a proxy for Atlassian.Jira.Jira – How can I unit test JIRA services in .NET?

Facing an error when mocking the JIRA client proxy for unit tests. How do I correctly simulate the client using interfaces?

public interface IJiraConnector {
    Task<List<string>> RetrieveIssuesAsync();
}

public class JiraHandler {
    private readonly IJiraConnector _connector;
    public JiraHandler(IJiraConnector connector) { _connector = connector; }
    public async Task<List<string>> GetIssuesAsync() => await _connector.RetrieveIssuesAsync();
}

hey guys, i had a simlar issue before. i ended up using moq to setup the interface properly. check if your interface is correctly spelled and registered. also, sometimes minor tweaks in the DI config can help. hope its useful, cheers!