public void PriorityTest() { int iPriority = 0; // TODO: 初始化为适当的值 CallPriorityAttribute target = new CallPriorityAttribute( iPriority ); // TODO: 初始化为适当的值 int expected = 0; // TODO: 初始化为适当的值 int actual; target.Priority = expected; actual = target.Priority; Assert.AreEqual( expected, actual ); Assert.Inconclusive( "验证此测试方法的正确性。" ); }
/// <summary> /// /// </summary> /// <param name="methodInfo"></param> /// <returns></returns> private int GetPriority(MethodInfo methodInfo) { object[] objects = methodInfo.GetCustomAttributes(typeof(CallPriorityAttribute), true); if (objects == null) { return(0); } if (objects.Length == 0) { return(0); } CallPriorityAttribute attribute = objects[0] as CallPriorityAttribute; if (attribute == null) { return(0); } return(attribute.Priority); }
public void CallPriorityAttributeConstructorTest() { int iPriority = 0; // TODO: 初始化为适当的值 CallPriorityAttribute target = new CallPriorityAttribute( iPriority ); Assert.Inconclusive( "TODO: 实现用来验证目标的代码" ); }