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 02669200A5B for ; Wed, 25 May 2016 17:49:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 00EAE160A29; Wed, 25 May 2016 15:49:25 +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 4F2B0160A0F for ; Wed, 25 May 2016 17:49:24 +0200 (CEST) Received: (qmail 68761 invoked by uid 500); 25 May 2016 15:49:23 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 68752 invoked by uid 99); 25 May 2016 15:49:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 May 2016 15:49:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 05CE4C0E1D for ; Wed, 25 May 2016 15:49:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id GBxd5Qwg2m-o for ; Wed, 25 May 2016 15:49:22 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id EF8585F484 for ; Wed, 25 May 2016 15:49:21 +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 0E853E009C for ; Wed, 25 May 2016 15:49:21 +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 0C0303A01DD for ; Wed, 25 May 2016 15:49:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1745509 - /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/PageLayoutTest.java Date: Wed, 25 May 2016 15:49:21 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160525154921.0C0303A01DD@svn01-us-west.apache.org> archived-at: Wed, 25 May 2016 15:49:25 -0000 Author: tilman Date: Wed May 25 15:49:20 2016 New Revision: 1745509 URL: http://svn.apache.org/viewvc?rev=1745509&view=rev Log: PDFBOX-3362: add test Added: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/PageLayoutTest.java (with props) Added: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/PageLayoutTest.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/PageLayoutTest.java?rev=1745509&view=auto ============================================================================== --- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/PageLayoutTest.java (added) +++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/PageLayoutTest.java Wed May 25 15:49:20 2016 @@ -0,0 +1,46 @@ +/* + * Copyright 2016 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.pdfbox.pdmodel; + +import java.util.EnumSet; +import java.util.HashSet; +import java.util.Set; +import static org.junit.Assert.assertEquals; +import org.junit.Test; + +/** + * @author Tilman Hausherr + */ +public class PageLayoutTest +{ + /** + * Test for completeness (PDFBOX-3362). + */ + @Test + public void testValues() + { + Set pageLayoutSet = EnumSet.noneOf(PageLayout.class); + Set stringSet = new HashSet(); + for (PageLayout pl : PageLayout.values()) + { + String s = pl.stringValue(); + stringSet.add(s); + pageLayoutSet.add(PageLayout.fromString(s)); + } + assertEquals(PageLayout.values().length, pageLayoutSet.size()); + assertEquals(PageLayout.values().length, stringSet.size()); + } +} Propchange: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/PageLayoutTest.java ------------------------------------------------------------------------------ svn:eol-style = native