Package org.candlepin.common.config

Examples of org.candlepin.common.config.MapConfiguration


    @Test(expected = JsonMappingException.class)
    public void importFailsOnUnknownPropertiesWithNonDefaultConfig() throws Exception {
        // Override default config to error out on unknown properties:
        Map<String, String> configProps = new HashMap<String, String>();
        configProps.put(ConfigProperties.FAIL_ON_UNKNOWN_IMPORT_PROPERTIES, "true");
        mapper = SyncUtils.getObjectMapper(new MapConfiguration(configProps));

        importer.createObject(mapper, new StringReader(
            "{\"uuid\":\"test-uuid\", \"unknown\":\"notreal\"}"));
    }
View Full Code Here


                os.write(buf, 0, n);
            }
            os.flush();
            os.close();

            ObjectMapper om = SyncUtils.getObjectMapper(new MapConfiguration(
                    new HashMap<String, String>() {

                        {
                            put(ConfigProperties.FAIL_ON_UNKNOWN_IMPORT_PROPERTIES,
                                    "false");
View Full Code Here

            while ((n = zis.read(buf, 0, 1024)) > -1) {
                os.write(buf, 0, n);
            }
            os.flush();
            os.close();
            ObjectMapper om = SyncUtils.getObjectMapper(new MapConfiguration(
                    new HashMap<String, String>() {

                        {
                            put(ConfigProperties.FAIL_ON_UNKNOWN_IMPORT_PROPERTIES,
                                    "false");
View Full Code Here

public class ConsumerTypeImporterTest {
    private Configuration config;

    @Before
    public void init() {
        config = new MapConfiguration(new HashMap<String, String>() {

            {
                put(ConfigProperties.FAIL_ON_UNKNOWN_IMPORT_PROPERTIES, "false");
            }
        });
View Full Code Here

*/
public class MetaExporterTest {

    @Test
    public void testMetaExporter() throws IOException {
        ObjectMapper mapper = SyncUtils.getObjectMapper(new MapConfiguration(
                new HashMap<String, String>() {

                    {
                        put(ConfigProperties.FAIL_ON_UNKNOWN_IMPORT_PROPERTIES,
                                "false");
View Full Code Here

*/
public class BouncyCastlePKIReaderTest {

    @Test
    public void readkey() throws CertificateException {
        Configuration config = new MapConfiguration(
            new HashMap<String, String>() {

                {
                    put(ConfigProperties.CA_CERT,
                        "target/test/resources/certs/test.crt");
View Full Code Here

    private ProductImporter importer;
    private ProductCurator productCuratorMock;
    private ContentCurator contentCuratorMock;
    @Before
    public void setUp() throws IOException {
        mapper = SyncUtils.getObjectMapper(new MapConfiguration(
                new HashMap<String, String>() {

                    {
                        put(ConfigProperties.FAIL_ON_UNKNOWN_IMPORT_PROPERTIES,
                                "false");
View Full Code Here

* ConsumerExporterTest
*/
public class ConsumerExporterTest {
    @Test
    public void testConsumerExport() throws IOException {
        ObjectMapper mapper = SyncUtils.getObjectMapper(new MapConfiguration(
                new HashMap<String, String>() {

                    {
                        put(ConfigProperties.FAIL_ON_UNKNOWN_IMPORT_PROPERTIES,
                                "false");
View Full Code Here

* ProductExporterTest
*/
public class ProductExporterTest {
    @Test
    public void testProductExport() throws IOException {
        ObjectMapper mapper = SyncUtils.getObjectMapper(new MapConfiguration(
                new HashMap<String, String>() {

                    {
                        put(ConfigProperties.FAIL_ON_UNKNOWN_IMPORT_PROPERTIES,
                                "false");
View Full Code Here

*/
public class ConsumerTypeExporterTest {

    @Test
    public void testConsumerTypeExport() throws IOException {
        ObjectMapper mapper = SyncUtils.getObjectMapper(new MapConfiguration(
                new HashMap<String, String>() {

                    {
                        put(ConfigProperties.FAIL_ON_UNKNOWN_IMPORT_PROPERTIES,
                                "false");
View Full Code Here

TOP

Related Classes of org.candlepin.common.config.MapConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.