Ejemplo n.º 1
0
 public TestProcess(string applicationID, AsyncTestFixture fixture, ProcessStartInfo startInfo, string processID)
     : base(fixture)
 {
     this.applicationID = applicationID;
     ProcessID          = processID;
     this.startInfo     = startInfo;
     this.entryPoint    = registeredApplications[startInfo.FileName];
     breakpoints        = new ConcurrentDictionary <string, TestBreakpoint>();
 }
Ejemplo n.º 2
0
        public static TestProcess WaitProcessStart(string applicationName, AsyncTestFixture fixture)
        {
            AutoResetEvent wait, cont;

            lock (runningProcesses) {
                TestProcess runningProcess = runningProcesses.Keys.Where(p => string.Equals(p.startInfo.FileName, applicationName, StringComparison.Ordinal)).FirstOrDefault();
                if (runningProcess != null)
                {
                    return(runningProcess);
                }
                wait = new AutoResetEvent(false);
                cont = new AutoResetEvent(false);
                waitStart.Add(applicationName, new Tuple <AutoResetEvent, AutoResetEvent>(wait, cont));
            }
            fixture.WaitOne(wait);
            TestProcess process = runningProcesses.Keys.Where(p => string.Equals(p.startInfo.FileName, applicationName, StringComparison.Ordinal)).Single();

            cont.Set();
            return(process);
        }
Ejemplo n.º 3
0
 public AsyncTestObjectBase(AsyncTestFixture fixture)
 {
     Fixture = fixture;
 }
Ejemplo n.º 4
0
 public TestBreakpoint(string name, AsyncTestFixture fixture, TestProcess process)
     : base(fixture)
 {
     this.name    = name;
     this.process = process;
 }
 public AsyncTestObjectBase(AsyncTestFixture fixture) {
     Fixture = fixture;
 }
 public static TestProcess WaitProcessStart(string applicationName, AsyncTestFixture fixture) {
     AutoResetEvent wait, cont;
     lock(runningProcesses) {
         TestProcess runningProcess = runningProcesses.Keys.Where(p => string.Equals(p.startInfo.FileName, applicationName, StringComparison.Ordinal)).FirstOrDefault();
         if(runningProcess != null) return runningProcess;
         wait = new AutoResetEvent(false);
         cont = new AutoResetEvent(false);
         waitStart.Add(applicationName, new Tuple<AutoResetEvent, AutoResetEvent>(wait, cont));
     }
     fixture.WaitOne(wait);
     TestProcess process = runningProcesses.Keys.Where(p => string.Equals(p.startInfo.FileName, applicationName, StringComparison.Ordinal)).Single();
     cont.Set();
     return process;
 }
 public TestProcess(AsyncTestFixture fixture, ProcessStartInfo startInfo)
     : base(fixture) {
     this.startInfo = startInfo;
     this.entryPoint = registeredApplications[startInfo.FileName];
     breakpoints = new ConcurrentDictionary<string, TestBreakpoint>();
 }
 public TestBreakpoint(AsyncTestFixture fixture) : base(fixture) { }
 public TestBreakpoint(string name, AsyncTestFixture fixture, TestProcess process)
     : base(fixture) {
     this.name = name;
     this.process = process;
 }