1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
<Type Name="AssertionException" FullName="NUnit.Framework.AssertionException">
<TypeSignature Language="C#" Maintainer="auto" Value="public class AssertionException : Exception" />
<AssemblyInfo>
<AssemblyName>nunit.framework</AssemblyName>
<AssemblyPublicKey>
</AssemblyPublicKey>
<AssemblyVersion>2.1.4.0</AssemblyVersion>
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Base>
<BaseTypeName>System.Exception</BaseTypeName>
</Base>
<Interfaces>
</Interfaces>
<Docs>
<summary>
The class AssertionException is thrown if an Assertion failed.
</summary>
<remarks>
<para>
You can use this Exception if you want to split up your Test method.
</para>
<example>
<code lang="C#">
using NUnit.Framework;
[TestFixture]
public class MyUnitTest : Assertion {
string foo;
[SetUp]
public void GetReady()
{
foo = "Foobar";
}
[Test]
public void Foobar()
{
try {
Foo (foo);
} catch (AssertionException ex) {
throw new AssertionException ("Foobar failed: " + ex.Message, ex);
}
try {
Bar (foo);
} catch (AssertionException ex) {
throw new AssertionException ("Foobar failed: " + ex.Message, ex);
}
}
private void Foo (string foobar)
{
Assert ("(1) Foo: ", foobar.StartsWith ("Foo"));
}
private void Bar (string foobar)
{
Assert ("(2) Bar: ", foobar.EndsWith ("bar"));
}
}
</code>
</example>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public AssertionException (string message);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="message" Type="System.String" />
</Parameters>
<Docs>
<param name="message">The message</param>
<summary>Creates an AssertionException with a message</summary>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected AssertionException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
<Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
</Parameters>
<Docs>
<param name="info">The serialization info.</param>
<param name="context">The streaming context</param>
<summary>Creates an AssertionException with customized serialization handling.</summary>
<remarks>
</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public AssertionException (string message, Exception inner);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="message" Type="System.String" />
<Parameter Name="inner" Type="System.Exception" />
</Parameters>
<Docs>
<param name="message">The message</param>
<param name="inner">An exception which should be wrapped</param>
<summary>Creates an AssertionException with a message and wraps it around another exception</summary>
<remarks>To be added.</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
</Members>
</Type>
|