NUnit.Framework.Assert.IsInstanceOf(object, string, params object[])

Here are the examples of the csharp api class NUnit.Framework.Assert.IsInstanceOf(object, string, params object[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

1. Example

Project: MimeKit
Source File: EncoderTests.cs
View license
static void AssertIsDecoderFilter (ContentEncoding encoding, ContentEncoding expected)
		{
			var filter = DecoderFilter.Create (encoding);

			Assert.IsInstanceOf<DecoderFilter> (filter, "Expected DecoderFilter for ContentEncoding.{0}", encoding);

			var decoder = (DecoderFilter) filter;

			Assert.AreEqual (expected, decoder.Encoding, "Expected decoder's Encoding to be ContentEncoding.{0}", expected);
		}

2. Example

Project: MimeKit
Source File: EncoderTests.cs
View license
static void AssertIsEncoderFilter (string encoding, ContentEncoding expected)
		{
			var filter = EncoderFilter.Create (encoding);

			Assert.IsInstanceOf<EncoderFilter> (filter, "Expected EncoderFilter for \"{0}\"", encoding);

			var encoder = (EncoderFilter) filter;

			Assert.AreEqual (expected, encoder.Encoding, "Expected encoder's Encoding to be ContentEncoding.{0}", expected);
		}

3. Example

Project: MimeKit
Source File: EncoderTests.cs
View license
static void AssertIsDecoderFilter (string encoding, ContentEncoding expected)
		{
			var filter = DecoderFilter.Create (encoding);

			Assert.IsInstanceOf<DecoderFilter> (filter, "Expected DecoderFilter for \"{0}\"", encoding);

			var decoder = (DecoderFilter) filter;

			Assert.AreEqual (expected, decoder.Encoding, "Expected decoder's Encoding to be ContentEncoding.{0}", expected);
		}

4. Example

Project: MimeKit
Source File: EncoderTests.cs
View license
static void AssertIsEncoderFilter (ContentEncoding encoding, ContentEncoding expected)
		{
			var filter = EncoderFilter.Create (encoding);

			Assert.IsInstanceOf<EncoderFilter> (filter, "Expected EncoderFilter for ContentEncoding.{0}", encoding);

			var encoder = (EncoderFilter) filter;

			Assert.AreEqual (expected, encoder.Encoding, "Expected encoder's Encoding to be ContentEncoding.{0}", expected);
		}