Hi Jeff – I think you may be on to something.
I had not noticed that the following text was being sent to the ‘Test
Output’ window when Visual Studio was rendering the tests.
[error] An exception was thrown while exploring tests.
Location: D:\<MyDir>\MyClass.cs(238)
Details: System.FormatException: Input string was not in a correct
format.
at System.Number.StringToNumber(String str, NumberStyles options,
NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style,
NumberFormatInfo info)
at System.Byte.Parse(String s, NumberStyles style, NumberFormatInfo
info)
at Mono.Cecil.AssemblyNameReference.Parse(String fullName)
at Mono.Cecil.Signatures.SignatureReader.CreateTypeReference(String
typeName, String asmName, Boolean isValueType)
at Mono.Cecil.Signatures.SignatureReader.CreateTypeReference(String
typeName, Boolean isValueType)
at Mono.Cecil.Signatures.SignatureReader.ReadSimpleValue(Byte[]
data, BinaryReader br, TypeReference type, Boolean& read, Boolean
resolve)
at Mono.Cecil.Signatures.SignatureReader.ReadElem(Byte[] data,
BinaryReader br, TypeReference elemType, Boolean& read, Boolean
resolve)
at
Mono.Cecil.Signatures.SignatureReader.ReadCustomAttrib(BinaryReader
br, Byte[] data, MethodReference ctor, Boolean resolve)
at Mono.Cecil.Signatures.SignatureReader.GetCustomAttrib(Byte[]
data, MethodReference ctor, Boolean resolve)
at Mono.Cecil.ReflectionReader.GetCustomAttribute(MethodReference
ctor, Byte[] data, Boolean resolve)
at Mono.Cecil.CustomAttribute.Resolve()
at
Gallio.Common.Reflection.Impl.CecilReflectionPolicy.<EnumerateAttributes>d__31.MoveNext()
in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Common
\Reflection\Impl\CecilReflectionPolicy.cs:line 286
at
Gallio.Common.Reflection.Impl.StaticCodeElementWrapper.<GetAllCustomAttributes>b__13()
in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Common
\Reflection\Impl\StaticCodeElementWrapper.cs:line 259
at Gallio.Common.Memoizer`1.Memoize(Func`1 populator) in c:\RelEng
\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Common\Memoizer.cs:line
67
at
Gallio.Common.Reflection.Impl.StaticCodeElementWrapper.GetAllCustomAttributes()
in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Common
\Reflection\Impl\StaticCodeElementWrapper.cs:line 255
at
Gallio.Common.Reflection.Impl.StaticCodeElementWrapper.<GetAttributeInfos>d__1.MoveNext()
in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Common
\Reflection\Impl\StaticCodeElementWrapper.cs:line 55
at
Gallio.Common.Reflection.AttributeUtils.<ResolveAttributes>d__c.MoveNext()
in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Common
\Reflection\AttributeUtils.cs:line 127
at
Gallio.Common.Reflection.AttributeUtils.<GetAttributes>d__0`1.MoveNext()
in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Common
\Reflection\AttributeUtils.cs:line 50
at
Gallio.Framework.Pattern.DeclarativePatternResolver.<GetPatterns>d__0.MoveNext()
in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Framework
\Pattern\DeclarativePatternResolver.cs:line 43
at
Gallio.Framework.Pattern.DefaultPatternEvaluator.GetPrimaryPattern(ICodeElementInfo
codeElement) in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio
\Framework\Pattern\DefaultPatternEvaluator.cs:line 203
at
Gallio.Framework.Pattern.DefaultPatternEvaluator.Consume(IPatternScope
containingScope, ICodeElementInfo codeElement, Boolean skipChildren,
IPattern defaultPrimaryPattern) in c:\RelEng\Projects\MbUnit v3.1\Work
\src\Gallio\Gallio\Framework\Pattern\DefaultPatternEvaluator.cs:line
147
For info, my ExpectedException attributes look like this, and they are
being successfully rendered through the Gallio front-end.
[Test]
[ExpectedException(typeof(FaultException<SystemFault>),
"Expected Exception message here...")]
public void MyTest()
{
}
[Test]
[Row(null, null, ExpectedException =
typeof(FaultException<SystemFault>), ExpectedExceptionMessage =
"Expected Exception message here...")]
public void MyTest2(int[] x, int[] y)
{
}
I am using Gallio bundle 3.1.397. Let me know if you need any more
info.
Kevin
> >
mbunitdev+...@googlegroups.com<mbunitdev%2Bunsubscribe@googlegroups .com>
> > .