コード例 #1
0
        public void Detach(LoggedTest test)
        {
            if (_forwardingProvider.LoggerFactory != test.LoggerFactory)
            {
                throw new InvalidOperationException("Different test is attached to this fixture");
            }

            _forwardingProvider.LoggerFactory = null;
        }
コード例 #2
0
        public void Attach(LoggedTest test)
        {
            if (_forwardingProvider.LoggerFactory != null)
            {
                throw new InvalidOperationException("Test instance is already attached to this fixture");
            }

            _forwardingProvider.LoggerFactory = test.LoggerFactory;
        }