PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Demo.Mmose.Core.Test/ServerEngine/Entity/Item/RemovingSubItemCallEventArgsTest.cs

#
C# | 116 lines | 64 code | 8 blank | 44 comment | 0 complexity | 9a01a4965e6bb5f09c4853a9fa1a1984 MD5 | raw file
Possible License(s): LGPL-2.1
  1. using Demo.Mmose.Core.Entity.Item;
  2. using Microsoft.VisualStudio.TestTools.UnitTesting;
  3. namespace Demo.Mmose.Core.Test
  4. {
  5. /// <summary>
  6. ///这是 RemovingSubItemCallEventArgsTest 的测试类,旨在
  7. ///包含所有 RemovingSubItemCallEventArgsTest 单元测试
  8. ///</summary>
  9. [TestClass()]
  10. public class RemovingSubItemCallEventArgsTest
  11. {
  12. private TestContext testContextInstance;
  13. /// <summary>
  14. ///获取或设置测试上下文,上下文提供
  15. ///有关当前测试运行及其功能的信息。
  16. ///</summary>
  17. public TestContext TestContext
  18. {
  19. get { return testContextInstance; }
  20. set { testContextInstance = value; }
  21. }
  22. #region 附加测试属性
  23. //
  24. //编写测试时,还可使用以下属性:
  25. //
  26. //使用 ClassInitialize 在运行类中的第一个测试前先运行代码
  27. //[ClassInitialize()]
  28. //public static void MyClassInitialize(TestContext testContext)
  29. //{
  30. //}
  31. //
  32. //使用 ClassCleanup 在运行完类中的所有测试后再运行代码
  33. //[ClassCleanup()]
  34. //public static void MyClassCleanup()
  35. //{
  36. //}
  37. //
  38. //使用 TestInitialize 在运行每个测试前先运行代码
  39. //[TestInitialize()]
  40. //public void MyTestInitialize()
  41. //{
  42. //}
  43. //
  44. //使用 TestCleanup 在运行完每个测试后运行代码
  45. //[TestCleanup()]
  46. //public void MyTestCleanup()
  47. //{
  48. //}
  49. //
  50. #endregion
  51. /// <summary>
  52. ///RemoveSubItem 的测试
  53. ///</summary>
  54. public void RemoveSubItemTestHelper<T>()
  55. where T : BaseItem
  56. {
  57. T removeSubItem = default( T ); // TODO: 初始化为适当的值
  58. BaseItemContainer<T> itemContainerT = null; // TODO: 初始化为适当的值
  59. RemovingSubItemCallEventArgs<T> target = new RemovingSubItemCallEventArgs<T>( removeSubItem, itemContainerT ); // TODO: 初始化为适当的值
  60. T actual;
  61. actual = target.RemoveSubItem;
  62. Assert.Inconclusive( "验证此测试方法的正确性。" );
  63. }
  64. [TestMethod()]
  65. public void RemoveSubItemTest()
  66. {
  67. Assert.Inconclusive( "没有找到能够满足 T 的类型约束的相应类型参数。请以适当的类型参数来调用 RemoveSubItemTestHelper<T>()。" );
  68. }
  69. /// <summary>
  70. ///IsCancel 的测试
  71. ///</summary>
  72. public void IsCancelTestHelper<T>()
  73. where T : BaseItem
  74. {
  75. T removeSubItem = default( T ); // TODO: 初始化为适当的值
  76. BaseItemContainer<T> itemContainerT = null; // TODO: 初始化为适当的值
  77. RemovingSubItemCallEventArgs<T> target = new RemovingSubItemCallEventArgs<T>( removeSubItem, itemContainerT ); // TODO: 初始化为适当的值
  78. bool expected = false; // TODO: 初始化为适当的值
  79. bool actual;
  80. target.IsCancel = expected;
  81. actual = target.IsCancel;
  82. Assert.AreEqual( expected, actual );
  83. Assert.Inconclusive( "验证此测试方法的正确性。" );
  84. }
  85. [TestMethod()]
  86. public void IsCancelTest()
  87. {
  88. Assert.Inconclusive( "没有找到能够满足 T 的类型约束的相应类型参数。请以适当的类型参数来调用 IsCancelTestHelper<T>()。" );
  89. }
  90. /// <summary>
  91. ///RemovingSubItemCallEventArgs`1 构造函数 的测试
  92. ///</summary>
  93. public void RemovingSubItemCallEventArgsConstructorTestHelper<T>()
  94. where T : BaseItem
  95. {
  96. T removeSubItem = default( T ); // TODO: 初始化为适当的值
  97. BaseItemContainer<T> itemContainerT = null; // TODO: 初始化为适当的值
  98. RemovingSubItemCallEventArgs<T> target = new RemovingSubItemCallEventArgs<T>( removeSubItem, itemContainerT );
  99. Assert.Inconclusive( "TODO: 实现用来验证目标的代码" );
  100. }
  101. [TestMethod()]
  102. public void RemovingSubItemCallEventArgsConstructorTest()
  103. {
  104. Assert.Inconclusive( "没有找到能够满足 T 的类型约束的相应类型参数。请以适当的类型参数来调用 RemovingSubItemCallEventArgsConstructorTestH" +
  105. "elper<T>()。" );
  106. }
  107. }
  108. }