Overloaded. Verifies that a method was not called with arguments matching custom verifier.
Namespace: TypeMock.ArrangeActAssert.Fluent
Assembly: Typemock.ArrangeActAssert (in Typemock.ArrangeActAssert.dll) Version: 9.4.1.0 (9.4.1.0)
Syntax
Parameters
- action
- Type: SystemAction
A method returning a value in the form of a Lambda Expression that we want to verify if was called.
Return Value
Type: IArgumentsMatcherExceptions
| Exception | Condition |
|---|---|
| VerifyException | Thrown if the method, was not called with arguments matching the custom verifier. |
Remarks
Examples
[TestMethod] [Isolated] public void VerifyMethodCalledWithMatchingArguments() { var fake = Isolate.Fake.Instance<RealLogger>(); fake.Log(-1); Isolate.Verify.WasNotCalledWithArguments(() => fake.Log(0)).Matching(args => (int) args[0] > 0); }
[TestMethod] [Isolated] public void VerifyMethodCalledWithMatchingArguments() { var fake = Isolate.Fake.Instance<RealLogger>(); fake.Log(-1, "rts"); Isolate.Verify.WasNotCalledWithArguments(() => fake.Log(0, null)) .Matching(args => ((int) args[0] > 0) && ((string) args[1] == "str")); }
See Also