NUnit.Framework.Assert.IsNotAssignableFrom(object)

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

3 Examples 7

1. Example

View license
[Test]
    public void Finds_GitDirectory()
    {
        try
        {
            executeCore.ExecuteGitVersion(null, null, null, null, true, workDirectory, null);
        }
        catch (Exception ex)
        {
            // `RepositoryNotFoundException` means that it couldn't find the .git directory,
            // any other exception means that the .git was found but there was some other issue that this test doesn't care about.
            Assert.IsNotAssignableFrom<RepositoryNotFoundException>(ex);
        }
    }

2. Example

View license
[Test]
    public void Finds_GitDirectory_In_Parent()
    {
        var childDir = Path.Combine(workDirectory, "child");
        Directory.CreateDirectory(childDir);

        try
        {
            executeCore.ExecuteGitVersion(null, null, null, null, true, childDir, null);
        }
        catch (Exception ex)
        {
            // TODO I think this test is wrong.. It throws a different exception
            // `RepositoryNotFoundException` means that it couldn't find the .git directory,
            // any other exception means that the .git was found but there was some other issue that this test doesn't care about.
            Assert.IsNotAssignableFrom<RepositoryNotFoundException>(ex);
        }
    }

3. 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);
        }