public void GetEntryListStatictisc_count_noqulifier_nogroup_success() { ARSession session = new ARSession(); try { session.Login(TestServer, TestAdmin, TestAdminPwd); List <UInt32> groupIds = new List <UInt32>(); groupIds.Add(TestCharacterFieldId); var retlist = session.GetListEntryStatictisc( TestRegularFormName, null,//"'Character Field' = \"Hello Remedy\"", ARStatictisc.STAT_OP_COUNT, null, null ); Assert.AreEqual(1, retlist.Count); Assert.AreEqual(18, Convert.ToInt32(retlist[0].Statictisc)); Assert.AreEqual(null, retlist[0].GroupByValues); } catch (Exception ex) { Assert.AreEqual(null, ex); } session.LogOut(); }
public void GetEntryListStatictisc_min_qulifier_group_success() { ARSession session = new ARSession(); try { session.Login(TestServer, TestAdmin, TestAdminPwd); List <UInt32> groupIds = new List <UInt32>(); groupIds.Add(TestCharacterFieldId); var retlist = session.GetListEntryStatictisc( TestRegularFormName, "'Character Field' LIKE \"%你好%\"", ARStatictisc.STAT_OP_MINIMUM, TestIntFieldId, groupIds.ToArray() ); Assert.AreEqual(2, retlist.Count); Dictionary <String, int> assertTable = new Dictionary <string, int>(); //assertTable.Add("Hello Remedy", 7); assertTable.Add("你好 RemedySet Something", 1); assertTable.Add("你好 Remedy", 1); Assert.AreEqual(assertTable[retlist[0].GroupByValues[0].ToString()], Convert.ToInt32(retlist[0].Statictisc)); Assert.AreEqual(assertTable[retlist[1].GroupByValues[0].ToString()], Convert.ToInt32(retlist[1].Statictisc)); } catch (Exception ex) { Assert.AreEqual(null, ex); } session.LogOut(); }
public List <ARGroupByStatictisc> GetEntryListStatictisc( String SchemaName, String Qulification, ARStatictisc ARStat, Nullable <UInt32> TargetFieldId, List <UInt32> GroupbyFieldIdList ) { CheckSessionNull(); if (ARStat != ARStatictisc.STAT_OP_COUNT && TargetFieldId == null) { throw new ArgumentNullException("TargetFieldId can not be null while ARStat is not COUNT"); } return(SessionInstance.GetListEntryStatictisc(SchemaName, Qulification, ARStat, TargetFieldId, GroupbyFieldIdList == null ? null : GroupbyFieldIdList.ToArray() )); }
public void GetEntryListStatictisc_count_noqulifier_group_success() { ARSession session = new ARSession(); try { session.Login(TestServer, TestAdmin, TestAdminPwd); List<UInt32> groupIds = new List<UInt32>(); groupIds.Add(TestCharacterFieldId); var retlist = session.GetListEntryStatictisc( TestRegularFormName, null, ARStatictisc.STAT_OP_COUNT, null, groupIds.ToArray() ); Assert.AreEqual(3, retlist.Count); Dictionary<String, int> assertTable = new Dictionary<string, int>(); assertTable.Add("Hello Remedy", 7); assertTable.Add("你好 RemedySet Something", 2); assertTable.Add("你好 Remedy", 9); Assert.AreEqual(assertTable[retlist[0].GroupByValues[0].ToString()], Convert.ToInt32(retlist[0].Statictisc)); Assert.AreEqual(assertTable[retlist[1].GroupByValues[0].ToString()], Convert.ToInt32(retlist[1].Statictisc)); Assert.AreEqual(assertTable[retlist[2].GroupByValues[0].ToString()], Convert.ToInt32(retlist[2].Statictisc)); } catch (Exception ex) { Assert.AreEqual(null, ex); } session.LogOut(); }
public void GetEntryListStatictisc_count_qulifier_nogroup_success() { ARSession session = new ARSession(); try { session.Login(TestServer, TestAdmin, TestAdminPwd); List<UInt32> groupIds = new List<UInt32>(); groupIds.Add(TestCharacterFieldId); var retlist = session.GetListEntryStatictisc( TestRegularFormName, "'Character Field' = \"Hello Remedy\"", ARStatictisc.STAT_OP_COUNT, null, null ); Assert.AreEqual(1, retlist.Count); Assert.AreEqual(7, Convert.ToInt32(retlist[0].Statictisc)); Assert.AreEqual(null, retlist[0].GroupByValues); } catch (Exception ex) { Assert.AreEqual(null, ex); } session.LogOut(); }