Exemple #1
0
        public void CreateFromWorkItems_WhenCalled_LogsTheMethodCall()
        {
            // Act
            var result = test.Instance.CreateFromWorkItems(null);

            // Assert
            test.GetMockFor <ILogger>().Verify(logger => logger.Enter(test.Instance, "CreateFromWorkItems", It.IsAny <object[]>()), Times.Once());
        }
Exemple #2
0
        public void RunSyncronously_CalledWithNull_LogsWarningMessage()
        {
            // Arrange
            Func <Task> nullFunc = null;

            // Act
            test.Instance.RunSyncronously(nullFunc);

            // Assert
            test.GetMockFor <ILogger>().Verify(logger => logger.LogWarning(It.IsAny <string>()), Times.Once());
        }