public void TestArgumentExceptions ()
{
var part = new MimePart ();
Assert.Throws<ArgumentNullException> (() => new MimePart ((string) null));
Assert.Throws<ArgumentNullException> (() => new MimePart ((ContentType) null));
Assert.Throws<ArgumentNullException> (() => new MimePart (null, "octet-stream"));
Assert.Throws<ArgumentNullException> (() => new MimePart ("application", null));
Assert.Throws<ArgumentOutOfRangeException> (() => part.ContentDuration = -1);
Assert.Throws<ArgumentOutOfRangeException> (() => part.Prepare (EncodingConstraint.SevenBit, 1));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load ((Stream) null));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load ((Stream) null, true));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load ((ParserOptions) null, Stream.Null));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load (ParserOptions.Default, (Stream) null));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load (null, Stream.Null, true));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load (ParserOptions.Default, (Stream) null, true));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load ((ContentType) null, Stream.Null));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load (new ContentType ("application", "octet-stream"), null));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load (null, new ContentType ("application", "octet-stream"), Stream.Null));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load (ParserOptions.Default, null, Stream.Null));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load (ParserOptions.Default, new ContentType ("application", "octet-stream"), null));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load ((string) null));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load (null, "fileName"));
Assert.Throws<ArgumentNullException> (() => MimeEntity.Load (ParserOptions.Default, (string) null));
Assert.Throws<ArgumentNullException> (() => part.Accept (null));
Assert.Throws<ArgumentNullException> (() => part.WriteTo ((string) null));
Assert.Throws<ArgumentNullException> (() => part.WriteTo ((Stream) null));
Assert.Throws<ArgumentNullException> (() => part.WriteTo ((string) null, false));
Assert.Throws<ArgumentNullException> (() => part.WriteTo ((Stream) null, false));
Assert.Throws<ArgumentNullException> (() => part.WriteTo (null, Stream.Null));
Assert.Throws<ArgumentNullException> (() => part.WriteTo (FormatOptions.Default, (Stream) null));
Assert.Throws<ArgumentNullException> (() => part.WriteTo (null, "fileName"));
Assert.Throws<ArgumentNullException> (() => part.WriteTo (FormatOptions.Default, (string) null));
Assert.Throws<ArgumentNullException> (() => part.WriteTo (null, Stream.Null, false));
Assert.Throws<ArgumentNullException> (() => part.WriteTo (FormatOptions.Default, (Stream) null, false));
Assert.Throws<ArgumentNullException> (() => part.WriteTo (null, "fileName", false));
Assert.Throws<ArgumentNullException> (() => part.WriteTo (FormatOptions.Default, (string) null, false));
}