<Type Name="AssertionException" FullName="NUnit.Framework.AssertionException">
  <TypeSignature Language="C#" Value="public class AssertionException : System.Exception, ISerializable" Maintainer="auto" />
  <AssemblyInfo>
    <AssemblyName>NUnit.Framework</AssemblyName>
    <AssemblyPublicKey>
    </AssemblyPublicKey>
    <AssemblyVersion>2.1.4.0</AssemblyVersion>
    <AssemblyCulture>neutral</AssemblyCulture>
    <Attributes>
      <Attribute>
        <AttributeName>System.CLSCompliantAttribute</AttributeName>
      </Attribute>
    </Attributes>
  </AssemblyInfo>
  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the &lt;link location="node:gtk-sharp/programming/threads"&gt;Gtk# Thread Programming&lt;/link&gt; for details.</ThreadSafetyStatement>
  <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>
  <Base>
    <BaseTypeName>System.Exception</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>System.Runtime.Serialization.ISerializable</InterfaceName>
    </Interface>
  </Interfaces>
  <Attributes />
  <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>
        <summary>Creates an AssertionException with a message</summary>
        <param name="message">The message</param>
      </Docs>
    </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>
        <summary>Creates an AssertionException with a message and wraps it around another exception</summary>
        <param name="message">The message</param>
        <param name="inner">An exception which should be wrapped</param>
      </Docs>
    </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>
        <summary>Creates an AssertionException with customized serialization handling.</summary>
        <param name="info">The serialization info.</param>
        <param name="context">The streaming context</param>
        <returns>a <see cref="T:NUnit.Framework.AssertionException" /></returns>
        <remarks>
        </remarks>
      </Docs>
    </Member>
  </Members>
</Type>