Ejemplo n.º 1
0
 public virtual void TestConvertLocatedBlockArray()
 {
     LocatedBlock[] lbl = new LocatedBlock[3];
     for (int i = 0; i < 3; i++)
     {
         lbl[i] = CreateLocatedBlock();
     }
     HdfsProtos.LocatedBlockProto[] lbpl = PBHelper.ConvertLocatedBlock(lbl);
     LocatedBlock[] lbl2 = PBHelper.ConvertLocatedBlock(lbpl);
     NUnit.Framework.Assert.AreEqual(lbl.Length, lbl2.Length);
     for (int i_1 = 0; i_1 < lbl.Length; i_1++)
     {
         Compare(lbl[i_1], lbl2[i_1]);
     }
 }
Ejemplo n.º 2
0
        public virtual void TestConvertLocatedBlockList()
        {
            AList <LocatedBlock> lbl = new AList <LocatedBlock>();

            for (int i = 0; i < 3; i++)
            {
                lbl.AddItem(CreateLocatedBlock());
            }
            IList <HdfsProtos.LocatedBlockProto> lbpl = PBHelper.ConvertLocatedBlock2(lbl);
            IList <LocatedBlock> lbl2 = PBHelper.ConvertLocatedBlock(lbpl);

            NUnit.Framework.Assert.AreEqual(lbl.Count, lbl2.Count);
            for (int i_1 = 0; i_1 < lbl.Count; i_1++)
            {
                Compare(lbl[i_1], lbl2[2]);
            }
        }