// Setup
        public AppDomainWorkerShould()
        {
            var setup = new AppDomainSetup
            {
                ApplicationBase = AppDomain.CurrentDomain.BaseDirectory,
            };

            _domain = AppDomain.CreateDomain("AppDomainIsolation: " + Guid.NewGuid(), null, setup);
            var type = typeof(AppDomainWorker);

            Assert.NotNull(type.FullName);

            _reflectionWorker = (IReflectionWorker)_domain.CreateInstanceFromAndUnwrap(type.Assembly.Location, type.FullName);
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestCycleBuilder"/> class.
 /// </summary>
 /// <param name="reflectionWorker"> Worker for reflection operation. </param>
 public TestCycleBuilder(IReflectionWorker reflectionWorker)
 {
     _reflectionWorker = reflectionWorker;
     _reflectionHelper = new ReflectionHelper(reflectionWorker);
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReflectionHelper"/> class.
 /// </summary>
 /// <param name="reflectHelper">An instance to reflection helper for type information.</param>
 internal ReflectionHelper(IReflectionWorker reflectHelper)
 {
     this._reflectionWorker = reflectHelper;
 }