예제 #1
0
        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));
        }
예제 #3
0
        public void TestJobToBeFiredMessage()
        {
            // expectations
            Expect.Call(mockLog.IsInfoEnabled).Return(true);
            mockLog.Info(null);
            LastCall.IgnoreArguments();

            mockery.ReplayAll();

            plugin.JobToBeExecuted(CreateJobExecutionContext());
        }