xamarin-macios/tests/monotouch-test/VideoToolbox/VTMultiPassStorageTests.cs

64 строки
1.3 KiB
C#
Исходник Обычный вид История

2016-05-26 16:06:52 +03:00
//
// Unit tests for VTMultiPassStorage
//
// Authors:
// Alex Soto <alex.soto@xamarin.com>
//
//
// Copyright 2015 Xamarin Inc. All rights reserved.
//
#if !__TVOS__ && !__WATCHOS__
using System;
#if XAMCORE_2_0
using Foundation;
using VideoToolbox;
using UIKit;
using CoreMedia;
using AVFoundation;
using CoreFoundation;
#else
using MonoTouch.Foundation;
using MonoTouch.VideoToolbox;
using MonoTouch.UIKit;
using MonoTouch.CoreMedia;
using MonoTouch.AVFoundation;
using MonoTouch.CoreFoundation;
#endif
using NUnit.Framework;
namespace MonoTouchFixtures.VideoToolbox {
[TestFixture]
[Preserve (AllMembers = true)]
public class VTMultiPassStorageTests
{
[Test]
public void MultiPassStorageCreateTest ()
{
if (!TestRuntime.CheckSystemAndSDKVersion (8, 0))
Assert.Ignore ("Ignoring VideoToolbox tests: Requires iOS8+");
using (var storage = VTMultiPassStorage.Create ()){
Assert.IsNotNull (storage, "Storage should not be null");
}
}
[Test]
public void MultiPassStorageCloseTest ()
{
if (!TestRuntime.CheckSystemAndSDKVersion (8, 0))
Assert.Ignore ("Ignoring VideoToolbox tests: Requires iOS8+");
using (var storage = VTMultiPassStorage.Create ()){
var result = storage.Close ();
Assert.IsTrue (result == VTStatus.Ok, "VTMultiPassStorage Close");
}
}
}
}
#endif // !__TVOS__ && !__WATCHOS__