-
Notifications
You must be signed in to change notification settings - Fork 514
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aaa698a
commit 1ee4425
Showing
9 changed files
with
125 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
tests/monotouch-test/AVFoundation/AVCaptionDimensionTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#if __MACOS__ | ||
using System; | ||
using Foundation; | ||
using AVFoundation; | ||
using NUnit.Framework; | ||
using ObjCRuntime; | ||
|
||
namespace MonoTouchFixtures.AVFoundation { | ||
|
||
[TestFixture] | ||
[Preserve (AllMembers = true)] | ||
public class AVCaptionDimensionTest { | ||
|
||
[SetUp] | ||
public void SetUp () | ||
{ | ||
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 12,0); | ||
} | ||
|
||
[TestCase] | ||
public void CreateTest () | ||
{ | ||
// create a new struct, test that we do have the expected values | ||
nfloat val = 10; | ||
var units = AVCaptionUnitsType.Cells; | ||
var dimension = AVCaptionDimension.Create (val, units); | ||
Assert.AreEqual (val, dimension.Value, "Value"); | ||
Assert.AreEqual (units, dimension.Units); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#if __MACOS__ | ||
using System; | ||
using Foundation; | ||
using AVFoundation; | ||
using NUnit.Framework; | ||
using ObjCRuntime; | ||
|
||
namespace MonoTouchFixtures.AVFoundation { | ||
|
||
[TestFixture] | ||
[Preserve (AllMembers = true)] | ||
public class AVCaptionPointTest { | ||
|
||
[SetUp] | ||
public void SetUp () | ||
{ | ||
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 12,0); | ||
} | ||
|
||
[TestCase] | ||
public void CreateTest () | ||
{ | ||
nfloat val = 10; | ||
var units = AVCaptionUnitsType.Cells; | ||
var firstDimension = AVCaptionDimension.Create (val, units); | ||
var secondDimension = AVCaptionDimension.Create (val, units); | ||
|
||
var point = AVCaptionPoint.Create (firstDimension, secondDimension); | ||
Assert.AreEqual (val, point.X.Value, "X"); | ||
Assert.AreEqual (val, point.Y.Value, "Y"); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#if __MACOS__ | ||
using System; | ||
using Foundation; | ||
using AVFoundation; | ||
using NUnit.Framework; | ||
using ObjCRuntime; | ||
|
||
namespace MonoTouchFixtures.AVFoundation { | ||
|
||
[TestFixture] | ||
[Preserve (AllMembers = true)] | ||
public class AVCaptionSizeTest { | ||
|
||
[SetUp] | ||
public void SetUp () | ||
{ | ||
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 12,0); | ||
} | ||
|
||
[Test] | ||
public void CreateTest () | ||
{ | ||
nfloat val = 10; | ||
var units = AVCaptionUnitsType.Cells; | ||
var firstDimension = AVCaptionDimension.Create (val, units); | ||
var secondDimension = AVCaptionDimension.Create (val, units); | ||
|
||
var size = AVCaptionSize.Create (firstDimension, secondDimension); | ||
Assert.AreEqual (val, size.Width.Value, "Width"); | ||
Assert.AreEqual (val, size.Height.Value, "Height"); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters