public async Task TestJobToBeFiredMessage() { // arrange A.CallTo(() => mockLog.Log(LogLevel.Info, null, null, null)).Returns(true); // act await plugin.JobToBeExecuted(CreateJobExecutionContext()); // assert A.CallTo(() => mockLog.Log(A <LogLevel> .That.IsEqualTo(LogLevel.Info), A <Func <string> > .That.IsNull(), A <Exception> .That.IsNull(), A <object[]> .That.Not.IsNull())).MustHaveHappened(); }
public void TestJobToBeFiredMessage() { // arrange mockLog.Stub(log => log.IsInfoEnabled).Return(true); // act plugin.JobToBeExecuted(CreateJobExecutionContext()); // assert mockLog.AssertWasCalled(log => log.Info(Arg <string> .Is.NotNull)); }
public void TestJobToBeFiredMessage() { // expectations Expect.Call(mockLog.IsInfoEnabled).Return(true); mockLog.Info(null); LastCall.IgnoreArguments(); mockery.ReplayAll(); plugin.JobToBeExecuted(CreateJobExecutionContext()); }