blob: fcfd5f14135c8966d16c2e4ddfa910fdcdaf0378 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
package org.eclipse.osbp.xtext.functionlibrary.common.uomo.test;
import org.junit.Assert;
import org.junit.Test;
import org.eclipse.osbp.xtext.functionlibrary.common.uomo.ISystemOfQuantityUnits;
import org.eclipse.osbp.xtext.functionlibrary.common.uomo.MetricLengthUnit;
import org.eclipse.osbp.xtext.functionlibrary.common.uomo.UomoAPI;
public class UomoAPITest {
@Test
public void qUnit() {
String symbol = "cm";
ISystemOfQuantityUnits<?, ?> qUnit = UomoAPI.getQuantityUnit(symbol);
Assert.assertTrue(qUnit instanceof MetricLengthUnit);
Class<?> qUnitClass = UomoAPI.getQuantityClass(symbol);
Assert.assertSame(org.unitsofmeasurement.quantity.Length.class, qUnitClass);
}
}