示例#1
0
        private void InitializeWithException(Action <Exception> callback = null)
        {
            var initializeException = new Exception("initialize exception");

            mocker.Setup <ICoverageProjectFactory>(a => a.Initialize()).Throws(initializeException);

            initializer.Initialize();
            callback?.Invoke(initializeException);
        }
示例#2
0
        private async Task InitializeWithExceptionAsync(Action <Exception> callback = null)
        {
            var initializeException = new Exception("initialize exception");

            mocker.Setup <ICoverageProjectFactory>(a => a.Initialize()).Throws(initializeException);

            await initializer.InitializeAsync(CancellationToken.None);

            callback?.Invoke(initializeException);
        }