public static void AssertNotNullObjectTest() { Assert.That(() => AssertionUtilities.AssertNotNull(string.Empty), Throws.Nothing ); Assert.That(() => AssertionUtilities.AssertNotNull <object>(null), Configuration.AssertionsEnabled ? Throws.Exception : Throws.Nothing ); }
public static unsafe void AssertNotNullPointerTest() { Assert.That(() => AssertionUtilities.AssertNotNull((void *)1), Throws.Nothing ); Assert.That(() => AssertionUtilities.AssertNotNull(null), Configuration.AssertionsEnabled ? Throws.Exception : Throws.Nothing ); }
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 ); }