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

View license
public static void ShouldNotBeOfType(this object actual, Type expected)
        {
            Assert.IsNotInstanceOfType(expected, actual);
        }

2. Example

View license
[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);
            }
        }