Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4E4FF200AC8 for ; Mon, 9 May 2016 05:35:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4CDE9160A07; Mon, 9 May 2016 03:35:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 95592160A06 for ; Mon, 9 May 2016 05:35:50 +0200 (CEST) Received: (qmail 26864 invoked by uid 500); 9 May 2016 03:35:49 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 26855 invoked by uid 99); 9 May 2016 03:35:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 03:35:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 117C7180595 for ; Mon, 9 May 2016 03:35:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.799 X-Spam-Level: * X-Spam-Status: No, score=1.799 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id wx-o2w4oJcCi for ; Mon, 9 May 2016 03:35:48 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D638F5FAEA for ; Mon, 9 May 2016 03:35:47 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E78FEE00A9 for ; Mon, 9 May 2016 03:35:46 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 15B8B3A043D for ; Mon, 9 May 2016 03:35:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1742866 - in /poi/trunk/src/testcases/org/apache/poi: hssf/usermodel/TestHSSFComment.java ss/usermodel/BaseTestCellComment.java Date: Mon, 09 May 2016 03:35:45 -0000 To: commits@poi.apache.org From: onealj@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160509033546.15B8B3A043D@svn01-us-west.apache.org> archived-at: Mon, 09 May 2016 03:35:51 -0000 Author: onealj Date: Mon May 9 03:35:45 2016 New Revision: 1742866 URL: http://svn.apache.org/viewvc?rev=1742866&view=rev Log: move TestHSSFComment#attemptToSave2CommentsWithSameCoordinates down to BaseTestCellComment Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java?rev=1742866&r1=1742865&r2=1742866&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java (original) +++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java Mon May 9 03:35:45 2016 @@ -455,23 +455,4 @@ public final class TestHSSFComment exten wb.close(); } - - @Test - public void attemptToSave2CommentsWithSameCoordinates(){ - Object err = null; - - HSSFWorkbook wb = new HSSFWorkbook(); - HSSFSheet sh = wb.createSheet(); - HSSFPatriarch patriarch = sh.createDrawingPatriarch(); - patriarch.createCellComment(new HSSFClientAnchor()); - patriarch.createCellComment(new HSSFClientAnchor()); - - try{ - HSSFTestDataSamples.writeOutAndReadBack(wb); - } catch (IllegalStateException e){ - err = 1; - assertEquals(e.getMessage(), "found multiple cell comments for cell $A$1"); - } - assertNotNull(err); - } } Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java?rev=1742866&r1=1742865&r2=1742866&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCellComment.java Mon May 9 03:35:45 2016 @@ -23,6 +23,7 @@ import static org.junit.Assert.assertFal import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.io.IOException; @@ -354,4 +355,21 @@ public abstract class BaseTestCellCommen wb.close(); } + + @Test + public void attemptToSave2CommentsWithSameCoordinates(){ + Workbook wb = _testDataProvider.createWorkbook(); + Sheet sh = wb.createSheet(); + CreationHelper factory = wb.getCreationHelper(); + Drawing patriarch = sh.createDrawingPatriarch(); + patriarch.createCellComment(factory.createClientAnchor()); + patriarch.createCellComment(factory.createClientAnchor()); + + try{ + _testDataProvider.writeOutAndReadBack(wb); + fail("Expected IllegalStateException(found multiple cell comments for cell $A$1"); + } catch (IllegalStateException e){ + assertEquals("found multiple cell comments for cell $A$1", e.getMessage()); + } + } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org