Ejemplo n.º 1
0
    public static void AssertNotNullObjectTest()
    {
        Assert.That(() => AssertionUtilities.AssertNotNull(string.Empty),
                    Throws.Nothing
                    );

        Assert.That(() => AssertionUtilities.AssertNotNull <object>(null),
                    Configuration.AssertionsEnabled ? Throws.Exception : Throws.Nothing
                    );
    }
Ejemplo n.º 2
0
    public static unsafe void AssertNotNullPointerTest()
    {
        Assert.That(() => AssertionUtilities.AssertNotNull((void *)1),
                    Throws.Nothing
                    );

        Assert.That(() => AssertionUtilities.AssertNotNull(null),
                    Configuration.AssertionsEnabled ? Throws.Exception : Throws.Nothing
                    );
    }
Ejemplo n.º 3
0
    public static unsafe void AssertNotNullUnmanagedArrayTest()
    {
        Assert.That(() => AssertionUtilities.AssertNotNull(UnmanagedArray <int> .Empty),
                    Throws.Nothing
                    );

        Assert.That(() => AssertionUtilities.AssertNotNull(new UnmanagedArray <int>()),
                    Configuration.AssertionsEnabled ? Throws.Exception : Throws.Nothing
                    );
    }