Merge branch 'master' of ../controller
[yangtools.git] / yang / yang-data-codec-xml / src / test / java / org / opendaylight / yangtools / yang / data / codec / xml / TestFactories.java
1 /*
2  * Copyright (c) 2019 Pantheon Technologies, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.data.codec.xml;
9
10 import java.util.Arrays;
11 import java.util.Collection;
12 import javax.xml.stream.XMLOutputFactory;
13
14 final class TestFactories {
15     /**
16      * Non-repairing XMLOutputFactory.
17      */
18     static final XMLOutputFactory DEFAULT_OUTPUT_FACTORY = XMLOutputFactory.newFactory();
19
20     /**
21      * Repairing XMLOuputFactory.
22      */
23     static final XMLOutputFactory REPAIRING_OUTPUT_FACTORY;
24
25     static {
26         REPAIRING_OUTPUT_FACTORY = XMLOutputFactory.newFactory();
27         REPAIRING_OUTPUT_FACTORY.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
28     }
29
30     static Collection<Object[]> junitParameters() {
31         return Arrays.asList(new Object[][] {
32             { "default", DEFAULT_OUTPUT_FACTORY },
33             { "repairing", REPAIRING_OUTPUT_FACTORY },
34         });
35     }
36
37     private TestFactories() {
38
39     }
40 }