Skip to content

v4.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Nov 14:11

No action required

4.2.0 is additive. No existing method, signature or behaviour changes; ZeroBounce and ZeroBounceWarmup keep their non-virtual methods.

Added: interfaces for dependency injection and mocking

Both clients now implement an interface with every public API method and LastApiError:

  • IZeroBounce, implemented by ZeroBounce
  • IZeroBounceWarmup, implemented by ZeroBounceWarmup
public class SignupChecker
{
    private readonly IZeroBounce _zeroBounce;
    public SignupChecker(IZeroBounce zeroBounce) => _zeroBounce = zeroBounce;
}

// in a test (Moq)
var zeroBounce = new Mock<IZeroBounce>();

Setup (Instance, Initialize, the base URL setters and the constructors) is not on the interfaces; build the client as before and pass it in.

The interfaces gain a method whenever the SDK adds an API call, in minor releases. Mock them; implementing them in your own classes may require adding methods on upgrade.

Why 4.2.0

New public types and no breaking changes: a minor release.


  • build(deps): bump dotnet/sdk from 10.0 to 11.0 by @dependabot[bot] in #52
  • build(deps): bump actions/setup-dotnet from 6.0.0 to 6.1.0 by @dependabot[bot] in #53
  • build(deps): bump github/codeql-action/init from 4.37.8 to 4.39.3 by @dependabot[bot] in #54
  • feat: IZeroBounce and IZeroBounceWarmup interfaces for mocking the clients by @franciscbalint in #55

Full Changelog: v4.1.0...v4.2.0