From 0eff3ec28a7e3fe0b835b7be52217cce39b0fdf1 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Thu, 1 Dec 2016 17:01:42 -0500 Subject: [PATCH] [tests] Add missing test file for backport in c4710f69. --- .../AVFoundation/PlayerItemVideoOutputTest.cs | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tests/monotouch-test/AVFoundation/PlayerItemVideoOutputTest.cs diff --git a/tests/monotouch-test/AVFoundation/PlayerItemVideoOutputTest.cs b/tests/monotouch-test/AVFoundation/PlayerItemVideoOutputTest.cs new file mode 100644 index 000000000000..bd0c00fd25a9 --- /dev/null +++ b/tests/monotouch-test/AVFoundation/PlayerItemVideoOutputTest.cs @@ -0,0 +1,44 @@ +// +// Unit tests for AVPlayerItemVideoOutput +// +// Authors: +// Sebastien Pouliot +// +// Copyright 2016 Xamarin Inc. All rights reserved. +// + +#if !__WATCHOS__ + +using System; +#if XAMCORE_2_0 +using AVFoundation; +using CoreVideo; +using Foundation; +using UIKit; +#else +using MonoTouch.AVFoundation; +using MonoTouch.CoreVideo; +using MonoTouch.Foundation; +using MonoTouch.UIKit; +#endif +using NUnit.Framework; + +namespace MonoTouchFixtures.AVFoundation { + + [TestFixture] + [Preserve (AllMembers = true)] + public class PlayerItemVideoOutputTest { + + [Test] + public void Ctor_CVPixelBufferAttributes () + { + var attributes = new CVPixelBufferAttributes () { + PixelFormatType = CVPixelFormatType.CV32BGRA + }; + using (var output = new AVPlayerItemVideoOutput (attributes)) + Assert.That (output.Handle, Is.Not.EqualTo (IntPtr.Zero), "valid"); + } + } +} + +#endif // !__WATCHOS__