// //编写测试时,还可使用以下属性: // //使用 ClassInitialize 在运行类中的第一个测试前先运行代码 //[ClassInitialize()] //public static void MyClassInitialize(TestContext testContext) //{ //} // //使用 ClassCleanup 在运行完类中的所有测试后再运行代码 //[ClassCleanup()] //public static void MyClassCleanup() //{ //} // //使用 TestInitialize 在运行每个测试前先运行代码 //[TestInitialize()] //public void MyTestInitialize() //{ //} // //使用 TestCleanup 在运行完每个测试后运行代码 //[TestCleanup()] //public void MyTestCleanup() //{ //} // #endregion /// <summary> ///UpdateWorldSpeed 的测试 ///</summary> public void UpdateWorldSpeedTestHelper <MapT, ItemT, ItemTemplateT, GameObjectT, GameObjectTemplateT, CreatureT, CreatureTemplateT, CharacterT>() where MapT : BaseMap where ItemT : BaseItem where ItemTemplateT : BaseItemTemplate where GameObjectT : BaseGameObject where GameObjectTemplateT : BaseGameObjectTemplate where CreatureT : BaseCreature where CreatureTemplateT : BaseCreatureTemplate where CharacterT : BaseCharacter { MmorpgWorld <MapT, ItemT, ItemTemplateT, GameObjectT, GameObjectTemplateT, CreatureT, CreatureTemplateT, CharacterT> target = new MmorpgWorld <MapT, ItemT, ItemTemplateT, GameObjectT, GameObjectTemplateT, CreatureT, CreatureTemplateT, CharacterT>(); // TODO: 初始化为适当的值 TimeSpan expected = new TimeSpan(); // TODO: 初始化为适当的值 TimeSpan actual; target.UpdateWorldSpeed = expected; actual = target.UpdateWorldSpeed; Assert.AreEqual(expected, actual); Assert.Inconclusive("验证此测试方法的正确性。"); }
/// <summary> ///MmorpgWorld`8 构造函数 的测试 ///</summary> public void MmorpgWorldConstructorTest1Helper <MapT, ItemT, ItemTemplateT, GameObjectT, GameObjectTemplateT, CreatureT, CreatureTemplateT, CharacterT>() where MapT : BaseMap where ItemT : BaseItem where ItemTemplateT : BaseItemTemplate where GameObjectT : BaseGameObject where GameObjectTemplateT : BaseGameObjectTemplate where CreatureT : BaseCreature where CreatureTemplateT : BaseCreatureTemplate where CharacterT : BaseCharacter { MmorpgWorld <MapT, ItemT, ItemTemplateT, GameObjectT, GameObjectTemplateT, CreatureT, CreatureTemplateT, CharacterT> target = new MmorpgWorld <MapT, ItemT, ItemTemplateT, GameObjectT, GameObjectTemplateT, CreatureT, CreatureTemplateT, CharacterT>(); Assert.Inconclusive("TODO: 实现用来验证目标的代码"); }
public void MmorpgWorldConstructorTest() { MmorpgWorld target = new MmorpgWorld(); Assert.Inconclusive("TODO: 实现用来验证目标的代码"); }
/// <summary> ///StartUpdateWorld 的测试 ///</summary> public void StartUpdateWorldTestHelper <MapT, ItemT, ItemTemplateT, GameObjectT, GameObjectTemplateT, CreatureT, CreatureTemplateT, CharacterT>() where MapT : BaseMap where ItemT : BaseItem where ItemTemplateT : BaseItemTemplate where GameObjectT : BaseGameObject where GameObjectTemplateT : BaseGameObjectTemplate where CreatureT : BaseCreature where CreatureTemplateT : BaseCreatureTemplate where CharacterT : BaseCharacter { MmorpgWorld <MapT, ItemT, ItemTemplateT, GameObjectT, GameObjectTemplateT, CreatureT, CreatureTemplateT, CharacterT> target = new MmorpgWorld <MapT, ItemT, ItemTemplateT, GameObjectT, GameObjectTemplateT, CreatureT, CreatureTemplateT, CharacterT>(); // TODO: 初始化为适当的值 TimeSpan updateWorldSpeed = new TimeSpan(); // TODO: 初始化为适当的值 target.StartUpdateWorld(updateWorldSpeed); Assert.Inconclusive("无法验证不返回值的方法。"); }