public void CreateFromDisplayWrongIdTest() { TestRuntime.AssertSystemVersion(ApplePlatform.MacOSX, 12, 0); Assert.DoesNotThrow(() => { using var displayLink = CVDisplayLink.CreateFromDisplayId(UInt32.MaxValue); Assert.Null(displayLink, "null"); }, "Throws"); }
public void CreateFromDisplayIdValidIdTest() { TestRuntime.AssertSystemVersion(ApplePlatform.MacOSX, 12, 0); Assert.DoesNotThrow(() => { using var displayLink = CVDisplayLink.CreateFromDisplayId((uint)CGDisplay.MainDisplayID); Assert.NotNull(displayLink, "Not null"); Assert.AreEqual(CGDisplay.MainDisplayID, displayLink.GetCurrentDisplay(), "DisplayId"); }, "Throws"); }