示例#1
0
        internal void Initialize(Type type, XunitTest xunitTest)
        {
            if (_runWith != null)
            {
                return;
            }

            var runWith = type.GetCustomAttribute <RunWithAttribute>();

            if (runWith == null)
            {
                throw new InvalidOperationException("No run with class is found.");
            }

            _runWith = (IRunWith)Activator.CreateInstance(runWith.RunWithClass);
        }
示例#2
0
 public void Dispose()
 {
     _runWith.Dispose();
     _runWith = null;
 }