The name of expected function.
Exception message.
The file name that the assert failed in. Should be left as default.
The file line that the assert failed in. Should be left as default.
Are expected parameter values.
If function is call with parameters, will throw an UnitTestException.
1 interface Dummy 2 { 3 void test(); 4 void test(int a); 5 } 6 7 auto mock = new Mock!Dummy; 8 mock.test(12); 9 mock.expectNotCalled!"test"(); 10 mock.expectNotCalled!"test"(24); 11 12 // Will throw an exception like "UnitTestException@example.d(6): <test> expected call with <12> <0> count but called <1> counts 13 mock.exceptNotCalled!"test"(12);
Used to assert function not call