private void RunEvenOdd() { var depth = Thread.CurrentThread.ManagedThreadId; var algo = new TestAlgo(); algo.EvenOdd(depth); }
public void Test_EvenOdd() { var algo = new TestAlgo(); algo.EvenOdd(5); var context = Log.DumpInMemory(); var output = LogPrinter.Print(context); Console.WriteLine(output); }
public void Test_Constructor() { var algo = new TestAlgo(1); var output = GetOutput(); var ilalgo = WeaverHelper.CreateInstance <Yalf.TestAssembly.TestAlgo>(assembly, 1); var iloutput = GetOutput(); var equal = String.Compare(output, iloutput, StringComparison.OrdinalIgnoreCase) == 0; Assert.That(equal, Is.True); }
public void Test_Recursive_Enabled() { var algo = new TestAlgo(); algo.Recursive(10); var context = Log.DumpInMemory(); var output = LogPrinter.Print(context); Console.WriteLine(output); }
public void Test_Recursive_Enabled() { var algo = new TestAlgo(); algo.Recursive(10); var output = GetOutput(); var ilalgo = WeaverHelper.CreateInstance <Yalf.TestAssembly.TestAlgo>(assembly); ilalgo.Recursive(10); var iloutput = GetOutput(); var equal = String.Compare(output, iloutput, StringComparison.OrdinalIgnoreCase) == 0; Assert.That(equal, Is.True); }
public void Test_CrossThreadException() { try { var algo = new TestAlgo(); algo.SpinAThreadForWithException(); } catch { } var context = Log.DumpInMemory(); var output = LogPrinter.Print(context); Console.WriteLine(output); }
public void Test_Record_Binary_Display() { var algo = new TestAlgo(); try { algo.WithException(); } catch { } var data = Log.DumpToBinary(); var context = Log.DumpFromBinary(data); var output = LogPrinter.Print(context); Console.WriteLine(output); }
public void Test_Exception() { var algo = new TestAlgo(); bool exception = false; try { algo.WithException(); } catch { exception = true; } Assert.IsTrue(exception); var context = Log.DumpInMemory(); var output = LogPrinter.Print(context); Console.WriteLine(output); }
public void Test_Exception() { var algo = new TestAlgo(); bool exception = false; try { algo.WithException(); } catch { exception = true; } var output = GetOutput(); var ilalgo = WeaverHelper.CreateInstance <Yalf.TestAssembly.TestAlgo>(assembly); bool ilexception = false; try { ilalgo.WithException(); } catch { ilexception = true; } var iloutput = GetOutput(); Assert.That(exception, Is.True); Assert.That(ilexception, Is.True); var equal = String.Compare(output, iloutput, StringComparison.OrdinalIgnoreCase) == 0; Assert.That(equal, Is.True); }
private void RunException() { var algo = new TestAlgo(); algo.WithException(); }