66 строки
1.6 KiB
C#
66 строки
1.6 KiB
C#
//
|
|
// Unit tests for VTMultiPassStorage
|
|
//
|
|
// Authors:
|
|
// Alex Soto <alex.soto@xamarin.com>
|
|
//
|
|
//
|
|
// Copyright 2015 Xamarin Inc. All rights reserved.
|
|
//
|
|
|
|
#if !__WATCHOS__
|
|
|
|
using System;
|
|
|
|
#if XAMCORE_2_0
|
|
using Foundation;
|
|
using VideoToolbox;
|
|
using CoreMedia;
|
|
using AVFoundation;
|
|
using CoreFoundation;
|
|
using ObjCRuntime;
|
|
#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 ()
|
|
{
|
|
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
|
|
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
|
|
TestRuntime.AssertSystemVersion (PlatformName.TvOS, 10, 2, throwIfOtherPlatform: false);
|
|
|
|
using (var storage = VTMultiPassStorage.Create ()){
|
|
Assert.IsNotNull (storage, "Storage should not be null");
|
|
}
|
|
}
|
|
|
|
[Test]
|
|
public void MultiPassStorageCloseTest ()
|
|
{
|
|
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
|
|
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
|
|
TestRuntime.AssertSystemVersion (PlatformName.TvOS, 10, 2, throwIfOtherPlatform: false);
|
|
|
|
using (var storage = VTMultiPassStorage.Create ()){
|
|
var result = storage.Close ();
|
|
Assert.IsTrue (result == VTStatus.Ok, "VTMultiPassStorage Close");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif // !__WATCHOS__
|