blob: 117172b064497def56a37e0b8e1b28461df95e0e [file] [log] [blame]
/*
* Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0,
* or the Eclipse Distribution License v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
// Contributors:
// Matt MacIvor - 2.5.1 - initial implementation
package org.eclipse.persistence.testing.jaxb.json.adapter;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.persistence.jaxb.JAXBContextProperties;
import org.eclipse.persistence.testing.jaxb.json.JSONMarshalUnmarshalTestCases;
public class JsonMapAdapterTestCases extends JSONMarshalUnmarshalTestCases {
private final static String JSON_RESOURCE = "org/eclipse/persistence/testing/jaxb/json/adapter/adapter.json";
public JsonMapAdapterTestCases(String name) throws Exception {
super(name);
setControlJSON(JSON_RESOURCE);
setClasses(new Class[]{RootObject.class});
}
@Override
protected Object getControlObject() {
RootObject ro = new RootObject();
ro.setTitle("title");
ro.setData(new HashMap<String, Object>());
ro.getData().put("foo1", "bar1");
ro.getData().put("foo2", "bar2");
return ro;
}
@Override
public Map getProperties(){
Map props = new HashMap();
props.put(JAXBContextProperties.JSON_ATTRIBUTE_PREFIX, "");
return props;
}
}