IAudioMidrangeTest.cs 2.8 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 IAudioMidrange interface.
  28. /// </summary>
  29. [TestClass]
  30. public class IAudioMidrangeTest
  31. {
  32. /// <summary>
  33. /// Tests that the channel count can be received, for each applicable part in the system.
  34. /// </summary>
  35. [TestMethod]
  36. public void IAudioMidrange_GetChannelCount()
  37. {
  38. (new IPerChannelDbLevelTest<IAudioMidrange>()).ExecuteGetChannelCountTest();
  39. }
  40. /// <summary>
  41. /// Tests that the level of each channel can be received, for each applicable part in the system.
  42. /// </summary>
  43. [TestMethod]
  44. public void IAudioMidrange_GetLevel()
  45. {
  46. (new IPerChannelDbLevelTest<IAudioMidrange>()).ExecuteGetLevelTest();
  47. }
  48. /// <summary>
  49. /// Tests that the level range of each channel can be received, for each applicable part in the system.
  50. /// </summary>
  51. [TestMethod]
  52. public void IAudioMidrange_GetLevelRange()
  53. {
  54. (new IPerChannelDbLevelTest<IAudioMidrange>()).ExecuteGetLevelRangeTest();
  55. }
  56. /// <summary>
  57. /// Tests that the level of each channel can be set, for each applicable part in the system.
  58. /// </summary>
  59. [TestMethod]
  60. public void IAudioMidrange_SetLevel()
  61. {
  62. (new IPerChannelDbLevelTest<IAudioMidrange>()).ExecuteSetLevelTest();
  63. }
  64. /// <summary>
  65. /// Tests that the level of all channels can be set, for each applicable part in the system.
  66. /// </summary>
  67. [TestMethod]
  68. public void IAudioMidrange_SetLevelAllChannels()
  69. {
  70. (new IPerChannelDbLevelTest<IAudioMidrange>()).ExecuteSetLevelAllChannelsTest();
  71. }
  72. /// <summary>
  73. /// Tests that the level of all channels can be set uniformly, for each applicable part in the system.
  74. /// </summary>
  75. [TestMethod]
  76. public void IAudioMidrange_SetLevelUniform()
  77. {
  78. (new IPerChannelDbLevelTest<IAudioMidrange>()).ExecuteSetLevelUniformTest();
  79. }
  80. }
  81. }