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

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

20 Examples 7

1. Example

Project: ContinuousTests
Source File: TypeAssertTest.cs
View license
[Test()]
		public void IsNotAssignableFrom()
		{
			int [] array10 = new int [10];

			Assert.IsNotAssignableFrom( typeof(int[,] ),array10);
			Expect( array10, Not.AssignableFrom( typeof(int[,] ) ) );
#if NET_2_0
			Assert.IsNotAssignableFrom<int[,]>(array10);
#endif
		}

2. Example

Project: AutoTest.Net
Source File: TypeAssertTest.cs
View license
[Test()]
		public void IsNotAssignableFrom()
		{
			int [] array10 = new int [10];

			Assert.IsNotAssignableFrom( typeof(int[,] ),array10);
			Expect( array10, Not.AssignableFrom( typeof(int[,] ) ) );
#if NET_2_0
			Assert.IsNotAssignableFrom<int[,]>(array10);
#endif
		}

3. Example

Project: AutoTest.Net
Source File: TypeAssertTest.cs
View license
[Test()]
		public void IsNotAssignableFrom()
		{
			int [] array10 = new int [10];

			Assert.IsNotAssignableFrom( typeof(int[,] ),array10);
			Expect( array10, Not.AssignableFrom( typeof(int[,] ) ) );
#if NET_2_0
			Assert.IsNotAssignableFrom<int[,]>(array10);
#endif
		}

4. Example

Project: AutoTest.Net
Source File: TypeAssertTest.cs
View license
[Test()]
		public void IsNotAssignableFrom()
		{
			int [] array10 = new int [10];

			Assert.IsNotAssignableFrom( typeof(int[,] ),array10);
			Expect( array10, Not.AssignableFrom( typeof(int[,] ) ) );
#if CLR_2_0 || CLR_4_0
            Assert.IsNotAssignableFrom<int[,]>(array10);
#endif
		}

5. Example

Project: UnityAutoMoq
Source File: CoreTdd.cs
View license
public static object ShouldNotBeOfType<TExpected>(this object actual)
        {
            Assert.IsNotAssignableFrom(typeof(TExpected), actual);
            return actual;
        }

6. Example

Project: UnityAutoMoq
Source File: CoreTdd.cs
View license
public static object ShouldNotBeOfType(this object actual, Type expected)
        {
            Assert.IsNotAssignableFrom(expected, actual);
            return actual;
        }

7. Example

Project: ContinuousTests
Source File: TypeAssertTest.cs
View license
[Test()]
		public void IsNotAssignableFrom()
		{
			int [] array10 = new int [10];

			Assert.IsNotAssignableFrom( typeof(int[,] ),array10);
			Expect( array10, Not.AssignableFrom( typeof(int[,] ) ) );
#if CLR_2_0 || CLR_4_0
            Assert.IsNotAssignableFrom<int[,]>(array10);
#endif
		}

8. Example

Project: ContinuousTests
Source File: TypeAssertTest.cs
View license
[Test()]
		public void IsNotAssignableFrom()
		{
			int [] array10 = new int [10];

			Assert.IsNotAssignableFrom( typeof(int[,] ),array10);
			Expect( array10, Not.AssignableFrom( typeof(int[,] ) ) );
#if NET_2_0
			Assert.IsNotAssignableFrom<int[,]>(array10);
#endif
		}

9. Example

Project: nunit
Source File: TypeAssertTest.cs
View license
[Test()]
        public void IsNotAssignableFrom()
        {
            int [] array10 = new int [10];

            Assert.IsNotAssignableFrom( typeof(int[,] ),array10);
            Assert.That( array10, Is.Not.AssignableFrom( typeof(int[,] ) ) );
            Assert.IsNotAssignableFrom<int[,]>(array10);
        }

10. Example

View license
[Test]
		public void AssignableFromTypeTests()
		{
			// Classic syntax
			Assert.IsAssignableFrom(typeof(string), "Hello");
			Assert.IsNotAssignableFrom(typeof(string), 5);

			// Helper syntax
			Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
			Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
			
			// Inherited syntax
			Expect( "Hello", AssignableFrom(typeof(string)));
			Expect( 5, Not.AssignableFrom(typeof(string)));
		}

11. Example

View license
[Test]
		public void AssignableFromTypeTests()
		{
			// Classic syntax
			Assert.IsAssignableFrom(typeof(string), "Hello");
			Assert.IsNotAssignableFrom(typeof(string), 5);

			// Helper syntax
			Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
			Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
			
			// Inherited syntax
			Expect( "Hello", AssignableFrom(typeof(string)));
			Expect( 5, Not.AssignableFrom(typeof(string)));
		}

12. Example

Project: grisu.net
Source File: AssertSyntaxTests.cs
View license
[Test]
		public void AssignableFromTypeTests()
		{
			// Classic syntax
			Assert.IsAssignableFrom(typeof(string), "Hello");
			Assert.IsNotAssignableFrom(typeof(string), 5);

			// Helper syntax
			Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
			Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
			
			// Inherited syntax
			Expect( "Hello", AssignableFrom(typeof(string)));
			Expect( 5, Not.AssignableFrom(typeof(string)));
		}

13. Example

View license
[Test]
        public void AssignableFromTypeTests()
        {
            // Classic syntax
            Assert.IsAssignableFrom(typeof(string), "Hello");
            Assert.IsNotAssignableFrom(typeof(string), 5);

            // Constraint Syntax
            Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
            Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
            
            // Inherited syntax
            Expect( "Hello", AssignableFrom(typeof(string)));
            Expect( 5, Not.AssignableFrom(typeof(string)));
        }

14. Example

Project: Pash
Source File: AssertSyntaxTests.cs
View license
[Test]
		public void AssignableFromTypeTests()
		{
			// Classic syntax
			Assert.IsAssignableFrom(typeof(string), "Hello");
			Assert.IsNotAssignableFrom(typeof(string), 5);

			// Helper syntax
			Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
			Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
			
			// Inherited syntax
			Expect( "Hello", AssignableFrom(typeof(string)));
			Expect( 5, Not.AssignableFrom(typeof(string)));
		}

15. Example

View license
[Test]
		public void AssignableFromTypeTests()
		{
			// Classic syntax
			Assert.IsAssignableFrom(typeof(string), "Hello");
			Assert.IsNotAssignableFrom(typeof(string), 5);

			// Helper syntax
			Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
			Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
			
			// Inherited syntax
			Expect( "Hello", AssignableFrom(typeof(string)));
			Expect( 5, Not.AssignableFrom(typeof(string)));
		}

16. Example

Project: AutoTest.Net
Source File: AssertSyntaxTests.cs
View license
[Test]
		public void AssignableFromTypeTests()
		{
			// Classic syntax
			Assert.IsAssignableFrom(typeof(string), "Hello");
			Assert.IsNotAssignableFrom(typeof(string), 5);

			// Helper syntax
			Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
			Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
			
			// Inherited syntax
			Expect( "Hello", AssignableFrom(typeof(string)));
			Expect( 5, Not.AssignableFrom(typeof(string)));
		}

17. Example

View license
[Test]
		public void AssignableFromTypeTests()
		{
			// Classic syntax
			Assert.IsAssignableFrom(typeof(string), "Hello");
			Assert.IsNotAssignableFrom(typeof(string), 5);

			// Helper syntax
			Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
			Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
			
			// Inherited syntax
			Expect( "Hello", AssignableFrom(typeof(string)));
			Expect( 5, Not.AssignableFrom(typeof(string)));
		}

18. Example

Project: AutoTest.Net
Source File: AssertSyntaxTests.cs
View license
[Test]
		public void AssignableFromTypeTests()
		{
			// Classic syntax
			Assert.IsAssignableFrom(typeof(string), "Hello");
			Assert.IsNotAssignableFrom(typeof(string), 5);

			// Helper syntax
			Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
			Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
			
			// Inherited syntax
			Expect( "Hello", AssignableFrom(typeof(string)));
			Expect( 5, Not.AssignableFrom(typeof(string)));
		}

19. Example

Project: AutoTest.Net
Source File: AssertSyntaxTests.cs
View license
[Test]
		public void AssignableFromTypeTests()
		{
			// Classic syntax
			Assert.IsAssignableFrom(typeof(string), "Hello");
			Assert.IsNotAssignableFrom(typeof(string), 5);

			// Helper syntax
			Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
			Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
			
			// Inherited syntax
			Expect( "Hello", AssignableFrom(typeof(string)));
			Expect( 5, Not.AssignableFrom(typeof(string)));
		}

20. Example

View license
[Test]
		public void AssignableFromTypeTests()
		{
			// Classic syntax
			Assert.IsAssignableFrom(typeof(string), "Hello");
			Assert.IsNotAssignableFrom(typeof(string), 5);

			// Helper syntax
			Assert.That( "Hello", Is.AssignableFrom(typeof(string)));
			Assert.That( 5, Is.Not.AssignableFrom(typeof(string)));
			
			// Inherited syntax
			Expect( "Hello", AssignableFrom(typeof(string)));
			Expect( 5, Not.AssignableFrom(typeof(string)));
		}