IDeviceSpecificPropertyTest.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // -----------------------------------------
  2. // SoundScribe (TM) and related software.
  3. //
  4. // Copyright (C) 2007-2011 Vannatech
  5. // http://www.vannatech.com
  6. // All rights reserved.
  7. //
  8. // This source code is subject to the MIT License.
  9. // http://www.opensource.org/licenses/mit-license.php
  10. //
  11. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  17. // THE SOFTWARE.
  18. // -----------------------------------------
  19. using System;
  20. using CoreAudioTests.Common;
  21. using Microsoft.VisualStudio.TestTools.UnitTesting;
  22. using Vannatech.CoreAudio.Interfaces;
  23. using Vannatech.CoreAudio.Constants;
  24. namespace CoreAudioTests.DeviceTopologyApi
  25. {
  26. /// <summary>
  27. /// Tests all methods of the IDeviceSpecificProperty interface.
  28. /// </summary>
  29. [TestClass]
  30. public class IDeviceSpecificPropertyTest : TestClass<IDeviceSpecificProperty>
  31. {
  32. /// <summary>
  33. /// Test that the property value range and step may be received, for each available part in the system.
  34. /// </summary>
  35. [TestMethod]
  36. public void IDeviceSpecificProperty_Get4BRange()
  37. {
  38. ExecutePartActivationTest(activation =>
  39. {
  40. Int32 pMin = Int32.MaxValue, pMax = Int32.MinValue, pStep = Int32.MinValue;
  41. var result = activation.Get4BRange(out pMin, out pMax, out pStep);
  42. AssertCoreAudio.IsHResultOk(result);
  43. Assert.AreNotEqual(Int32.MaxValue, pMin, "The minimum property value was not received.");
  44. Assert.AreNotEqual(Int32.MinValue, pMax, "The maximum property value was not received.");
  45. Assert.AreNotEqual(Int32.MinValue, pStep, "The property step value was not received.");
  46. });
  47. }
  48. /// <summary>
  49. ///
  50. /// </summary>
  51. [TestMethod]
  52. public void IDeviceSpecificProperty_GetType()
  53. {
  54. ExecutePartActivationTest(activation =>
  55. {
  56. Assert.Fail("TODO: Determine how to properly test this method.");
  57. });
  58. }
  59. /// <summary>
  60. ///
  61. /// </summary>
  62. [TestMethod]
  63. public void IDeviceSpecificProperty_GetValue()
  64. {
  65. ExecutePartActivationTest(activation =>
  66. {
  67. Assert.Fail("TODO: Determine how to properly test this method.");
  68. });
  69. }
  70. /// <summary>
  71. ///
  72. /// </summary>
  73. [TestMethod]
  74. public void IDeviceSpecificProperty_SetValue()
  75. {
  76. ExecutePartActivationTest(activation =>
  77. {
  78. Assert.Fail("TODO: Determine how to properly test this method.");
  79. });
  80. }
  81. }
  82. }