// Path: sd-dss-util-cli/src/test/java/it/latraccia/dss/util/cli/test/PADESSuccessfulGenericTest.java
// @RunWith(value = Parameterized.class)
// public abstract class PADESSuccessfulGenericTest extends SuccessfulGenericTest {
// 
//     public PADESSuccessfulGenericTest(String description, Object[] args) {
//         super(description, args);
//     }
// 
//     @Parameterized.Parameters
//     public static Collection<Object[]> getSuccessfulTestParams() {
//         final Object[][] params =
//                 {
//                         // PDF, BES, ENVELOPED
//                         {"PDF, BES, ENVELOPED", new String[] {
//                                 SignatureArgsHelper.Input.PDF_FILE,
//                                 "-u=" + SignatureArgsHelper.Url.DSS,
//                                 "-f=" + SignatureArgsHelper.Format.PADES,
//                                 "-l=" + SignatureArgsHelper.Level.BES,
//                                 "-p=" + SignatureArgsHelper.Packaging.ENVELOPED,
//                                 "-o=\"" + SignatureArgsHelper.Output.ROOT + "\"",
//                                 "-d=" + SignatureArgsHelper.DigestAlgorithm.SHA256,
//                                 "-icn=\"" + SignatureArgsHelper.KeyRegex.MATCH_ALL + "\""
//                         }},
//                         // PDF, EPES, ENVELOPED
//                         {"PDF, EPES, ENVELOPED", new String[] {
//                                 SignatureArgsHelper.Input.PDF_FILE,
//                                 "-u=" + SignatureArgsHelper.Url.DSS,
//                                 "-f=" + SignatureArgsHelper.Format.PADES,
//                                 "-l=" + SignatureArgsHelper.Level.EPES,
//                                 "-p=" + SignatureArgsHelper.Packaging.ENVELOPED,
//                                 "-o=\"" + SignatureArgsHelper.Output.ROOT + "\"",
//                                 "-d=" + SignatureArgsHelper.DigestAlgorithm.SHA256,
//                                 "-icn=\"" + SignatureArgsHelper.KeyRegex.MATCH_ALL + "\""
//                         }}
//                 };
// 
//         return Arrays.asList(params);
//     }
// }
// 
// Path: sd-dss-util-cli/src/test/java/it/latraccia/dss/util/cli/test/util/SignatureArgsHelper.java
// public class SignatureArgsHelper {
// 
//     private static String resourceRoot;
// 
//     static {
//         resourceRoot = "";
//     }
// 
//     // All possibilities to be tested are listed here, then they are combined together
// 
//     public static class Url {
//         public static String DSS = "http://localhost:8080/service";
//     }
// 
//     public static class Input {
//         public static String PDF_FILE = getFile("pdf");
// 
//         public static String DOC_FILE = getFile("doc");
// 
//         public static String DOCX_FILE = getFile("docx");
// 
//         public static String ODT_FILE = getFile("odt");
// 
//         public static String XML_FILE = getFile("xml");
// 
//         private static String getFile(String extension) {
//             return "test." + extension;
//         }
//     }
// 
//     public static class Output {
//         public static String ROOT = resourceRoot;
//     }
// 
//     public static class PKCS12 {
//         public static String KEY = FileHelper.getResource("0F.p12");
// 
//         public static String PASSWORD = "password";
//     }
// 
//     public static class PKCS11 {
//         public static String LIBRARY = FileHelper.getResource("drivers/bit4ipki.dll");
// 
//         public static String PASSWORD = "16061981";
//     }
// 
//     public static class Format {
//         public static String CADES = "CAdES";
// 
//         public static String PADES = "PAdES";
// 
//         public static String XADES = "XAdES";
// 
//         public static String ASICS = "ASiC-S";
//     }
// 
//     public static class Level {
//         public static String BES = "BES";
// 
//         public static String EPES = "EPES";
// 
//         public static String LTV = "LTV";
// 
//         public static String T = "T";
// 
//         public static String C = "C";
// 
//         public static String X = "X";
// 
//         public static String XL = "XL";
// 
//         public static String A = "A";
//     }
// 
//     public static class Packaging {
//         public static String ENVELOPED = "ENVELOPED";
// 
//         public static String ENVELOPING = "ENVELOPING";
// 
//         public static String DETACHED = "DETACHED";
//     }
// 
//     public static class DigestAlgorithm {
//         public static String SHA256 = "SHA256";
//     }
// 
//     public static class KeyRegex {
//         public static String MATCH_ALL = ".*";
//     }
// 
//     public List<String> getBaseArgs() {
//         List<String> arguments = new ArrayList<String>();
//         Collections.addAll(arguments);
//         return arguments;
//     }
// }


import it.latraccia.dss.util.cli.test.PADESSuccessfulGenericTest;
import it.latraccia.dss.util.cli.test.util.SignatureArgsHelper;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/*
 * SD-DSS-Util, a Utility Library and a Command Line Interface for SD-DSS.
 * Copyright (C) 2013 La Traccia http://www.latraccia.it/en/
 * Developed by Francesco Pontillo
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see [http://www.gnu.org/licenses/].
 */

package it.latraccia.dss.util.cli.test.unit;


@RunWith(value = Parameterized.class)
@Category(value = it.latraccia.dss.util.cli.test.unit.PKCS12UnitTest.class)
public class PKCS12PADESSuccessfulUnitTest extends PADESSuccessfulGenericTest {

    public PKCS12PADESSuccessfulUnitTest(String description, Object[] args) {
        super(description, args);
    }

    @Override
    public boolean getSimulate() {
        return true;
    }

    @Override
    public String[] getClassArgs() {
        return new String[] {
// Path: sd-dss-util-cli/src/test/java/it/latraccia/dss/util/cli/test/PADESSuccessfulGenericTest.java
// @RunWith(value = Parameterized.class)
// public abstract class PADESSuccessfulGenericTest extends SuccessfulGenericTest {
// 
//     public PADESSuccessfulGenericTest(String description, Object[] args) {
//         super(description, args);
//     }
// 
//     @Parameterized.Parameters
//     public static Collection<Object[]> getSuccessfulTestParams() {
//         final Object[][] params =
//                 {
//                         // PDF, BES, ENVELOPED
//                         {"PDF, BES, ENVELOPED", new String[] {
//                                 SignatureArgsHelper.Input.PDF_FILE,
//                                 "-u=" + SignatureArgsHelper.Url.DSS,
//                                 "-f=" + SignatureArgsHelper.Format.PADES,
//                                 "-l=" + SignatureArgsHelper.Level.BES,
//                                 "-p=" + SignatureArgsHelper.Packaging.ENVELOPED,
//                                 "-o=\"" + SignatureArgsHelper.Output.ROOT + "\"",
//                                 "-d=" + SignatureArgsHelper.DigestAlgorithm.SHA256,
//                                 "-icn=\"" + SignatureArgsHelper.KeyRegex.MATCH_ALL + "\""
//                         }},
//                         // PDF, EPES, ENVELOPED
//                         {"PDF, EPES, ENVELOPED", new String[] {
//                                 SignatureArgsHelper.Input.PDF_FILE,
//                                 "-u=" + SignatureArgsHelper.Url.DSS,
//                                 "-f=" + SignatureArgsHelper.Format.PADES,
//                                 "-l=" + SignatureArgsHelper.Level.EPES,
//                                 "-p=" + SignatureArgsHelper.Packaging.ENVELOPED,
//                                 "-o=\"" + SignatureArgsHelper.Output.ROOT + "\"",
//                                 "-d=" + SignatureArgsHelper.DigestAlgorithm.SHA256,
//                                 "-icn=\"" + SignatureArgsHelper.KeyRegex.MATCH_ALL + "\""
//                         }}
//                 };
// 
//         return Arrays.asList(params);
//     }
// }
// 
// Path: sd-dss-util-cli/src/test/java/it/latraccia/dss/util/cli/test/util/SignatureArgsHelper.java
// public class SignatureArgsHelper {
// 
//     private static String resourceRoot;
// 
//     static {
//         resourceRoot = "";
//     }
// 
//     // All possibilities to be tested are listed here, then they are combined together
// 
//     public static class Url {
//         public static String DSS = "http://localhost:8080/service";
//     }
// 
//     public static class Input {
//         public static String PDF_FILE = getFile("pdf");
// 
//         public static String DOC_FILE = getFile("doc");
// 
//         public static String DOCX_FILE = getFile("docx");
// 
//         public static String ODT_FILE = getFile("odt");
// 
//         public static String XML_FILE = getFile("xml");
// 
//         private static String getFile(String extension) {
//             return "test." + extension;
//         }
//     }
// 
//     public static class Output {
//         public static String ROOT = resourceRoot;
//     }
// 
//     public static class PKCS12 {
//         public static String KEY = FileHelper.getResource("0F.p12");
// 
//         public static String PASSWORD = "password";
//     }
// 
//     public static class PKCS11 {
//         public static String LIBRARY = FileHelper.getResource("drivers/bit4ipki.dll");
// 
//         public static String PASSWORD = "16061981";
//     }
// 
//     public static class Format {
//         public static String CADES = "CAdES";
// 
//         public static String PADES = "PAdES";
// 
//         public static String XADES = "XAdES";
// 
//         public static String ASICS = "ASiC-S";
//     }
// 
//     public static class Level {
//         public static String BES = "BES";
// 
//         public static String EPES = "EPES";
// 
//         public static String LTV = "LTV";
// 
//         public static String T = "T";
// 
//         public static String C = "C";
// 
//         public static String X = "X";
// 
//         public static String XL = "XL";
// 
//         public static String A = "A";
//     }
// 
//     public static class Packaging {
//         public static String ENVELOPED = "ENVELOPED";
// 
//         public static String ENVELOPING = "ENVELOPING";
// 
//         public static String DETACHED = "DETACHED";
//     }
// 
//     public static class DigestAlgorithm {
//         public static String SHA256 = "SHA256";
//     }
// 
//     public static class KeyRegex {
//         public static String MATCH_ALL = ".*";
//     }
// 
//     public List<String> getBaseArgs() {
//         List<String> arguments = new ArrayList<String>();
//         Collections.addAll(arguments);
//         return arguments;
//     }
// }


// Path: sd-dss-util-cli/src/test/java/it/latraccia/dss/util/cli/test/unit/PKCS12PADESSuccessfulUnitTest.java
import it.latraccia.dss.util.cli.test.PADESSuccessfulGenericTest;
import it.latraccia.dss.util.cli.test.util.SignatureArgsHelper;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

/*
 * SD-DSS-Util, a Utility Library and a Command Line Interface for SD-DSS.
 * Copyright (C) 2013 La Traccia http://www.latraccia.it/en/
 * Developed by Francesco Pontillo
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see [http://www.gnu.org/licenses/].
 */

package it.latraccia.dss.util.cli.test.unit;


@RunWith(value = Parameterized.class)
@Category(value = it.latraccia.dss.util.cli.test.unit.PKCS12UnitTest.class)
public class PKCS12PADESSuccessfulUnitTest extends PADESSuccessfulGenericTest {

    public PKCS12PADESSuccessfulUnitTest(String description, Object[] args) {
        super(description, args);
    }

    @Override
    public boolean getSimulate() {
        return true;
    }

    @Override
    public String[] getClassArgs() {
        return new String[] {
                "-p12=\"" + SignatureArgsHelper.PKCS12.KEY + "\"",