NUnit.Framework.Assert.IsNotInstanceOfType(System.Type, object)

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

2 Examples 7

1. Example

Project: fluent-nhibernate
Source File: SpecificationExtensions.cs
public static void ShouldNotBeOfType(this object actual, Type expected)
        {
            Assert.IsNotInstanceOfType(expected, actual);
        }

2. Example

Project: ScrollsModLoader
Source File: InversionOfControlTests.cs
[Test]
        public void ContainerMustGracefullyHandleRecursiveServiceDependencies()
        {
            var container = new ServiceContainer();
            container.LoadFrom(AppDomain.CurrentDomain.BaseDirectory, "LinFu*.dll");

            container.AddService(typeof (SampleRecursiveTestComponent1), typeof (SampleRecursiveTestComponent1));
            container.AddService(typeof (SampleRecursiveTestComponent2), typeof (SampleRecursiveTestComponent2));

            try
            {
                var result = container.GetService<SampleRecursiveTestComponent1>();
            }
            catch (Exception ex)
            {
                Assert.IsNotInstanceOfType(typeof (StackOverflowException), ex);
            }
        }