Exemple #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);
        }
Exemple #2
0
 public void Dispose()
 {
     _runWith.Dispose();
     _runWith = null;
 }