diff --git a/test/Ben.Demystifier.Test/AggregateException.cs b/test/Ben.Demystifier.Test/AggregateException.cs index b2a8667..b4d66df 100644 --- a/test/Ben.Demystifier.Test/AggregateException.cs +++ b/test/Ben.Demystifier.Test/AggregateException.cs @@ -2,12 +2,11 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using System.Linq.Expressions; using System.Text.RegularExpressions; using System.Threading.Tasks; using Xunit; -namespace Demystify +namespace Ben.Demystifier.Test { public class AggregateException { @@ -38,7 +37,7 @@ namespace Demystify var trace = string.Join("", stackTrace.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries) // Remove items that vary between test runners .Where(s => - s != " at Task Demystify.DynamicCompilation.DoesNotPreventStackTrace()+() => { }" && + s != " at Task Ben.Demystifier.Test.DynamicCompilation.DoesNotPreventStackTrace()+() => { }" && !s.Contains("System.Threading.Tasks.Task.WaitAll") ) .Skip(1) @@ -47,19 +46,19 @@ namespace Demystify .Replace("<---", ""); var expected = string.Join("", new[] { - " at async Task Demystify.AggregateException.Throw1()", - " at async void Demystify.AggregateException.DemystifiesAggregateExceptions()+(?) => { }", + " at async Task Ben.Demystifier.Test.AggregateException.Throw1()", + " at async void Ben.Demystifier.Test.AggregateException.DemystifiesAggregateExceptions()+(?) => { }", " --- End of inner exception stack trace ---", - " at void Demystify.AggregateException.DemystifiesAggregateExceptions()", + " at void Ben.Demystifier.Test.AggregateException.DemystifiesAggregateExceptions()", "---> (Inner Exception #0) System.ArgumentException: Value does not fall within the expected range.", - " at async Task Demystify.AggregateException.Throw1()", - " at async void Demystify.AggregateException.DemystifiesAggregateExceptions()+(?) => { }", + " at async Task Ben.Demystifier.Test.AggregateException.Throw1()", + " at async void Ben.Demystifier.Test.AggregateException.DemystifiesAggregateExceptions()+(?) => { }", "---> (Inner Exception #1) System.NullReferenceException: Object reference not set to an instance of an object.", - " at async Task Demystify.AggregateException.Throw2()", - " at async void Demystify.AggregateException.DemystifiesAggregateExceptions()+(?) => { }", + " at async Task Ben.Demystifier.Test.AggregateException.Throw2()", + " at async void Ben.Demystifier.Test.AggregateException.DemystifiesAggregateExceptions()+(?) => { }", "---> (Inner Exception #2) System.InvalidOperationException: Operation is not valid due to the current state of the object.", - " at async Task Demystify.AggregateException.Throw3()", - " at async void Demystify.AggregateException.DemystifiesAggregateExceptions()+(?) => { }"}); + " at async Task Ben.Demystifier.Test.AggregateException.Throw3()", + " at async void Ben.Demystifier.Test.AggregateException.DemystifiesAggregateExceptions()+(?) => { }"}); Assert.Equal(expected, trace); } diff --git a/test/Ben.Demystifier.Test/Ben.Demystifier.Test.csproj b/test/Ben.Demystifier.Test/Ben.Demystifier.Test.csproj index 9b4760b..9400fa6 100644 --- a/test/Ben.Demystifier.Test/Ben.Demystifier.Test.csproj +++ b/test/Ben.Demystifier.Test/Ben.Demystifier.Test.csproj @@ -1,5 +1,5 @@ - + netcoreapp2.0;net46 @@ -7,9 +7,8 @@ - - - + + diff --git a/test/Ben.Demystifier.Test/DynamicCompilation.cs b/test/Ben.Demystifier.Test/DynamicCompilation.cs index d05f3d6..f5dc588 100644 --- a/test/Ben.Demystifier.Test/DynamicCompilation.cs +++ b/test/Ben.Demystifier.Test/DynamicCompilation.cs @@ -6,7 +6,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using Xunit; -namespace Demystify +namespace Ben.Demystifier.Test { public class DynamicCompilation { @@ -42,7 +42,7 @@ namespace Demystify // Remove items that vary between test runners .Where(s => s != " at void System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, object state)" && - s != " at Task Demystify.DynamicCompilation.DoesNotPreventStackTrace()+() => { }" + s != " at Task Ben.Demystifier.Test.DynamicCompilation.DoesNotPreventStackTrace()+() => { }" ) .ToArray(); @@ -50,7 +50,7 @@ namespace Demystify new[] { "System.ArgumentException: Message", " at void lambda_method(Closure)", - " at async Task Demystify.DynamicCompilation.DoesNotPreventStackTrace()"}, + " at async Task Ben.Demystifier.Test.DynamicCompilation.DoesNotPreventStackTrace()"}, trace); } diff --git a/test/Ben.Demystifier.Test/MixedStack.cs b/test/Ben.Demystifier.Test/MixedStack.cs index c98db5d..0fde176 100644 --- a/test/Ben.Demystifier.Test/MixedStack.cs +++ b/test/Ben.Demystifier.Test/MixedStack.cs @@ -6,7 +6,7 @@ using System.Runtime.CompilerServices; using System.Threading.Tasks; using Xunit; -namespace Demystify +namespace Ben.Demystifier.Test { public class MixedStack { @@ -57,16 +57,16 @@ namespace Demystify static List ExpectedCallStack = new List() { - "IEnumerable Demystify.MixedStack.Iterator()+MoveNext()", + "IEnumerable Ben.Demystifier.Test.MixedStack.Iterator()+MoveNext()", "string string.Join(string separator, IEnumerable values)", - "string Demystify.MixedStack+GenericClass.GenericMethod(ref V value)", - "async Task Demystify.MixedStack.MethodAsync(int value)", - "async Task Demystify.MixedStack.MethodAsync(TValue value)", - "(string val, bool) Demystify.MixedStack.Method(string value)", - "ref string Demystify.MixedStack.RefMethod(string value)", - "(string val, bool) Demystify.MixedStack.s_func(string s, bool b)", - "void Demystify.MixedStack.s_action(string s, bool b)", - "void Demystify.MixedStack.Start((string val, bool) param)" + "string Ben.Demystifier.Test.MixedStack+GenericClass.GenericMethod(ref V value)", + "async Task Ben.Demystifier.Test.MixedStack.MethodAsync(int value)", + "async Task Ben.Demystifier.Test.MixedStack.MethodAsync(TValue value)", + "(string val, bool) Ben.Demystifier.Test.MixedStack.Method(string value)", + "ref string Ben.Demystifier.Test.MixedStack.RefMethod(string value)", + "(string val, bool) Ben.Demystifier.Test.MixedStack.s_func(string s, bool b)", + "void Ben.Demystifier.Test.MixedStack.s_action(string s, bool b)", + "void Ben.Demystifier.Test.MixedStack.Start((string val, bool) param)" }; diff --git a/test/Ben.Demystifier.Test/NonThrownException.cs b/test/Ben.Demystifier.Test/NonThrownException.cs index 643ff88..d3c96db 100644 --- a/test/Ben.Demystifier.Test/NonThrownException.cs +++ b/test/Ben.Demystifier.Test/NonThrownException.cs @@ -5,7 +5,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using Xunit; -namespace Demystify +namespace Ben.Demystifier.Test { public class NonThrownException { @@ -34,8 +34,8 @@ namespace Demystify Assert.Equal( new[] { "System.Exception: Exception of type 'System.Exception' was thrown. ---> System.Exception: Exception of type 'System.Exception' was thrown.", - " at Task Demystify.NonThrownException.DoesNotPreventThrowStackTrace()+() => { }", - " at async Task Demystify.NonThrownException.DoesNotPreventThrowStackTrace()", + " at Task Ben.Demystifier.Test.NonThrownException.DoesNotPreventThrowStackTrace()+() => { }", + " at async Task Ben.Demystifier.Test.NonThrownException.DoesNotPreventThrowStackTrace()", " --- End of inner exception stack trace ---"}, trace); @@ -57,10 +57,10 @@ namespace Demystify Assert.Equal( new[] { "System.Exception: Exception of type 'System.Exception' was thrown. ---> System.Exception: Exception of type 'System.Exception' was thrown.", - " at Task Demystify.NonThrownException.DoesNotPreventThrowStackTrace()+() => { }", - " at async Task Demystify.NonThrownException.DoesNotPreventThrowStackTrace()", + " at Task Ben.Demystifier.Test.NonThrownException.DoesNotPreventThrowStackTrace()+() => { }", + " at async Task Ben.Demystifier.Test.NonThrownException.DoesNotPreventThrowStackTrace()", " --- End of inner exception stack trace ---", - " at async Task Demystify.NonThrownException.DoesNotPreventThrowStackTrace()" + " at async Task Ben.Demystifier.Test.NonThrownException.DoesNotPreventThrowStackTrace()" }, trace); }