Verify a method is called or not in Unit Test

LicenseManagerService.Verify(m => m.LoadProductLicenses(),Times.Once);

By calling the LicenseManagerService property, you’re creating a new mock object. Naturally, no invocations have ever been performed on this instance.

You should change this property’s implementation to return the same instance every time it is called.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)