public void TestSortTwoPartitions(string sPartition, Int64[] rg, string sPartition2, Int64[] rg2) { AzLogModel azlm = new AzLogModel(); azlm.AddTestDataPartition(DateTime.Parse(sPartition), rg, null); azlm.AddTestDataPartition(DateTime.Parse(sPartition2), rg2, null); List <Int64> pls = new List <Int64>(); foreach (Int64 n in rg) { pls.Add(n); } foreach (Int64 n in rg2) { pls.Add(n); } pls.Sort(); BuildView(azlm, new CompareLogEntryTickCount(azlm)); for (int i = 0; i < pls.Count; i++) { Assert.AreEqual(pls[i], AzleItem(i).EventTickCount); } }
public void TestMessageSplit(string sPartition, string sMessage, string[] rgsExpected) { AzLogModel azlm = new AzLogModel(); m_azlf = new AzLogFilter(); // just get a default empty one azlm.AddTestDataPartition(DateTime.Parse(sPartition), new Int64[] { 10 }, new string[] { sMessage }); BuildView(azlm, new CompareLogEntryTickCount(azlm)); AzLogEntry azle = AzleItem(0); Assert.AreEqual(rgsExpected[0], azle.Message); Assert.AreEqual(rgsExpected[1], azle.Message0); Assert.AreEqual(rgsExpected[2], azle.Message1); Assert.AreEqual(rgsExpected[3], azle.Message2); Assert.AreEqual(rgsExpected[4], azle.Message3); Assert.AreEqual(rgsExpected[5], azle.Message4); Assert.AreEqual(rgsExpected[6], azle.Message5); Assert.AreEqual(rgsExpected[7], azle.Message6); Assert.AreEqual(rgsExpected[8], azle.Message7); Assert.AreEqual(rgsExpected[9], azle.Message8); }
public void TestSortTwoPartitions(string sPartition, Int64[] rg, string sPartition2, Int64[] rg2) { AzLogModel azlm = new AzLogModel(); azlm.AddTestDataPartition(DateTime.Parse(sPartition), rg, null); azlm.AddTestDataPartition(DateTime.Parse(sPartition2), rg2, null); List<Int64> pls = new List<Int64>(); foreach (Int64 n in rg) pls.Add(n); foreach (Int64 n in rg2) pls.Add(n); pls.Sort(); BuildView(azlm, new CompareLogEntryTickCount(azlm)); for (int i = 0; i < pls.Count; i++) Assert.AreEqual(pls[i], AzleItem(i).EventTickCount); }
public void TestMessageSplit(string sPartition, string sMessage, string[] rgsExpected) { AzLogModel azlm = new AzLogModel(); azlm.AddTestDataPartition(DateTime.Parse(sPartition), new Int64[] {10}, new string[] {sMessage}); BuildView(azlm, new CompareLogEntryTickCount(azlm)); AzLogEntry azle = AzleItem(0); Assert.AreEqual(rgsExpected[0], azle.Message); Assert.AreEqual(rgsExpected[1], azle.Message0); Assert.AreEqual(rgsExpected[2], azle.Message1); Assert.AreEqual(rgsExpected[3], azle.Message2); Assert.AreEqual(rgsExpected[4], azle.Message3); Assert.AreEqual(rgsExpected[5], azle.Message4); Assert.AreEqual(rgsExpected[6], azle.Message5); Assert.AreEqual(rgsExpected[7], azle.Message6); Assert.AreEqual(rgsExpected[8], azle.Message7); Assert.AreEqual(rgsExpected[9], azle.Message8); }