blob: dcdebed5b18c34882573cbb5068feb9ec2cb6a36 [file] [log] [blame]
/********************************************************************************
* Copyright (c) 2015-2018 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* 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.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
package org.eclipse.mdm.businessobjects.boundary.integrationtest;
import org.eclipse.mdm.api.base.model.ContextType;
import org.eclipse.mdm.api.base.model.VersionState;
import org.eclipse.mdm.api.dflt.model.TemplateRoot;
import org.junit.BeforeClass;
/**
* Test class for TemplateRootResource for TestEquipment {@link ContextType}.
*
* @author Alexander Nehmer, science+computing AG Tuebingen (Atos SE)
* @see EntityResourceIntegrationTest
*
*/
public class TemplateRootTEQResourceIntegrationTest extends EntityResourceIntegrationTest {
@BeforeClass
public static void prepareTestData() {
getLogger().debug("Preparing TemplateRootTEQResourceIntegrationTest");
// set up test data
setContextClass(TemplateRootTEQResourceIntegrationTest.class);
putTestDataValue(TESTDATA_RESOURCE_URI, "/tplroots/testequipment");
putTestDataValue(TESTDATA_ENTITY_NAME, "testTplRootTEQ");
putTestDataValue(TESTDATA_ENTITY_TYPE, "TemplateRoot");
TemplateRoot tplRoot = ENTITY_FACTORY.createTemplateRoot(ContextType.TESTEQUIPMENT,
getTestDataValue(TESTDATA_ENTITY_NAME));
tplRoot.setVersionState(VersionState.VALID);
putTestDataValue(TESTDATA_CREATE_JSON_BODY, toJson(tplRoot));
}
}