public void DirectDispatcherExecutesTasksInTheCallerThread() { var directDispatcher = new DirectDispatcher(); if (Thread.CurrentThread.Name == null) { Thread.CurrentThread.Name = "unit Test thread"; } directDispatcher.Dispatch(() => this.executingThreadName = Thread.CurrentThread.Name); Check.That(this.executingThreadName).IsEqualTo(Thread.CurrentThread.Name).And.IsNotNull(); }
public void DirectDispatcherExecutesTasksInTheCallerThread() { var directDispatcher = new DirectDispatcher(); if (Thread.CurrentThread.Name == null) { Thread.CurrentThread.Name = "unit Test thread"; } directDispatcher.Dispatch(() => this.executingThreadName = Thread.CurrentThread.Name); Check.That(this.executingThreadName).IsEqualTo(Thread.CurrentThread.Name).And.IsNotNull(); }