blob: c7798abe6bbffc71f297ea4a4ab3d18da68ebc14 [file] [log] [blame]
/**
* Copyright (c) 2014 Codetrails GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Daniel Haftstein - initial tests.
*/
package org.eclipse.epp.logging.aeri.core;
import org.eclipse.epp.logging.aeri.core.impl.ModelFactoryImpl;
import org.junit.Ignore;
import org.junit.Test;
public class ModelFactoryTest {
@Test
@Ignore
public void testStringToListConversionImplemented() {
// This test checks if the list-string conversion is implemented in the generated code.
// If it fails, replace the tested methods with the following implementation:
// public List<String> createListOfStringsFromString(EDataType eDataType, String initialValue) {
// return Splitter.on(';').omitEmptyStrings().trimResults().splitToList(initialValue);
//
// }
//
// public String convertListOfStringsToString(EDataType eDataType, Object instanceValue) {
// return Joiner.on(";").skipNulls().join((Iterable<?>) instanceValue);
// }
ModelFactoryImpl mf = (ModelFactoryImpl) IModelFactory.eINSTANCE;
String stringList = "a.b;c.d";
// List<String> theList = mf.createListOfStringsFromString(mock(EDataType.class), stringList);
// String convertedStringList = mf.convertListOfStringsToString(mock(EDataType.class), theList);
// assertThat(stringList, is(convertedStringList));
}
}