Debian Codegraph @

sejda-conversion/src/test/java/org/sejda/conversion/ToCPolicyAdapterTest.java

raw
1 /*
2 * Created on 16 feb 2016
3 * Copyright 2015 by Andrea Vacondio ([email protected]).
4 * This file is part of Sejda.
5 *
6 * Sejda is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Sejda is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with Sejda. If not, see <http://www.gnu.org/licenses/>.
18 */
19 package org.sejda.conversion;
20
21 import org.junit.Test;
22 import org.sejda.model.exception.SejdaRuntimeException;
23
24 /**
25 * @author Andrea Vacondio
26 *
27 */
28 public class ToCPolicyAdapterTest {
29 @Test
30 public void testAdapt() {
31 new ToCPolicyAdapter("none").getEnumValue();
32 new ToCPolicyAdapter("doc_titles").getEnumValue();
33 new ToCPolicyAdapter("file_names").getEnumValue();
34 }
35
36 @Test(expected = SejdaRuntimeException.class)
37 public void testInvalid() {
38 new ToCPolicyAdapter("Chuck").getEnumValue();
39 }
40 }