public void QueryTestuserListTest() { IFacadeTestUser facade = new Factories().InstanceTestUser(); var resultMsg =string.Empty; var criteria = new CriteriaTestuser() { Count = 100 }; var list = facade.QueryTestuserList(out resultMsg, criteria); var data = facade.QueryTable(out resultMsg, count: 20); if (list.Count > 0 && data.Tables[0].Rows.Count > 0) { Assert.IsTrue(true); } else { Assert.IsTrue(false); } }
/// <summary> /// 类反射操作 /// </summary> public byte[] FacadeTestUserOperate(byte[] bytes) { byte[] returnObj = null; OperateClass ope = (OperateClass)SerializerDeserialize.Deserialize(bytes); if (ope == null) { return returnObj; } if (string.IsNullOrWhiteSpace(ope.Method)) { return returnObj; } IFacadeTestUser testUser = new Factories().InstanceTestUser(); Type myType = testUser.GetType(); MethodInfo myMethodInfo = myType.GetMethod(ope.Method, new Type[] { typeof(string).MakeByRefType(), typeof(object) }); ope.ResultObj = myMethodInfo.Invoke(testUser, ope.Parameters); returnObj = SerializerDeserialize.Serializer(ope); return returnObj; }