public void TestFindCommentShape() { XSSFVMLDrawing vml = new XSSFVMLDrawing(); vml.Read(POIDataSamples.GetSpreadSheetInstance().OpenResourceAsStream("vmlDrawing1.vml")); CT_Shape sh_a1 = vml.FindCommentShape(0, 0); Assert.IsNotNull(sh_a1); Assert.AreEqual("_x0000_s1025", sh_a1.id); CT_Shape sh_b1 = vml.FindCommentShape(0, 1); Assert.IsNotNull(sh_b1); Assert.AreEqual("_x0000_s1026", sh_b1.id); CT_Shape sh_c1 = vml.FindCommentShape(0, 2); Assert.IsNull(sh_c1); CT_Shape sh_d1 = vml.newCommentShape(); Assert.AreEqual("_x0000_s1027", sh_d1.id); sh_d1.GetClientDataArray(0).SetRowArray(0, 0); sh_d1.GetClientDataArray(0).SetColumnArray(0, 3); Assert.AreSame(sh_d1, vml.FindCommentShape(0, 3)); //newly created drawing XSSFVMLDrawing newVml = new XSSFVMLDrawing(); Assert.IsNull(newVml.FindCommentShape(0, 0)); sh_a1 = newVml.newCommentShape(); Assert.AreEqual("_x0000_s1025", sh_a1.id); sh_a1.GetClientDataArray(0).SetRowArray(0, 0); sh_a1.GetClientDataArray(0).SetColumnArray(0, 1); Assert.AreSame(sh_a1, newVml.FindCommentShape(0, 1)); }
public void TestFindCommentShape() { XSSFVMLDrawing vml = new XSSFVMLDrawing(); vml.Read(POIDataSamples.GetSpreadSheetInstance().OpenResourceAsStream("vmlDrawing1.vml")); CT_Shape sh_a1 = vml.FindCommentShape(0, 0); Assert.IsNotNull(sh_a1); Assert.AreEqual("_x0000_s1025", sh_a1.id); CT_Shape sh_b1 = vml.FindCommentShape(0, 1); Assert.IsNotNull(sh_b1); Assert.AreEqual("_x0000_s1026", sh_b1.id); CT_Shape sh_c1 = vml.FindCommentShape(0, 2); Assert.IsNull(sh_c1); CT_Shape sh_d1 = vml.newCommentShape(); Assert.AreEqual("_x0000_s1027", sh_d1.id); sh_d1.GetClientDataArray(0).SetRowArray(0, 0); sh_d1.GetClientDataArray(0).SetColumnArray(0, 3); Assert.AreSame(sh_d1, vml.FindCommentShape(0, 3)); //newly created drawing XSSFVMLDrawing newVml = new XSSFVMLDrawing(); Assert.IsNull(newVml.FindCommentShape(0, 0)); sh_a1 = newVml.newCommentShape(); Assert.AreEqual("_x0000_s1025", sh_a1.id); sh_a1.GetClientDataArray(0).SetRowArray(0, 0); sh_a1.GetClientDataArray(0).SetColumnArray(0, 1); Assert.AreSame(sh_a1, newVml.FindCommentShape(0, 1)); }
public void TestRemoveCommentShape() { XSSFVMLDrawing vml = new XSSFVMLDrawing(); vml.Read(POIDataSamples.GetSpreadSheetInstance().OpenResourceAsStream("vmlDrawing1.vml")); CT_Shape sh_a1 = vml.FindCommentShape(0, 0); Assert.IsNotNull(sh_a1); Assert.IsTrue(vml.RemoveCommentShape(0, 0)); Assert.IsNull(vml.FindCommentShape(0, 0)); }
public void TestRemoveCommentShape() { XSSFVMLDrawing vml = new XSSFVMLDrawing(); vml.Read(POIDataSamples.GetSpreadSheetInstance().OpenResourceAsStream("vmlDrawing1.vml")); CT_Shape sh_a1 = vml.FindCommentShape(0, 0); Assert.IsNotNull(sh_a1); Assert.IsTrue(vml.RemoveCommentShape(0, 0)); Assert.IsNull(vml.FindCommentShape(0, 0)); }