Package com.powsybl.commons.test
Class AbstractConverterTest
- java.lang.Object
-
- com.powsybl.commons.test.AbstractConverterTest
-
public abstract class AbstractConverterTest extends Object
- Author:
- Geoffroy Jamgotchian
-
-
Field Summary
Fields Modifier and Type Field Description protected FileSystem
fileSystem
protected Path
tmpDir
-
Constructor Summary
Constructors Constructor Description AbstractConverterTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> T
roundTripTest(T data, BiConsumer<T,Path> out, Function<Path,T> in, String ref)
protected <T> T
roundTripTest(T data, BiConsumer<T,Path> out, Function<Path,T> in, BiConsumer<InputStream,InputStream> compare, String ref)
protected <T> T
roundTripXmlTest(T data, BiConsumer<T,Path> out, Function<Path,T> in, String ref)
void
setUp()
void
tearDown()
protected <T> Path
writeTest(T data, BiConsumer<T,Path> out, BiConsumer<InputStream,InputStream> compare, String ref)
protected <T> Path
writeXmlTest(T data, BiConsumer<T,Path> out, String ref)
-
-
-
Field Detail
-
fileSystem
protected FileSystem fileSystem
-
tmpDir
protected Path tmpDir
-
-
Method Detail
-
setUp
public void setUp() throws IOException
- Throws:
IOException
-
tearDown
public void tearDown() throws IOException
- Throws:
IOException
-
roundTripXmlTest
protected <T> T roundTripXmlTest(T data, BiConsumer<T,Path> out, Function<Path,T> in, String ref) throws IOException
- Throws:
IOException
-
roundTripTest
protected <T> T roundTripTest(T data, BiConsumer<T,Path> out, Function<Path,T> in, String ref) throws IOException
- Throws:
IOException
-
writeXmlTest
protected <T> Path writeXmlTest(T data, BiConsumer<T,Path> out, String ref) throws IOException
- Throws:
IOException
-
writeTest
protected <T> Path writeTest(T data, BiConsumer<T,Path> out, BiConsumer<InputStream,InputStream> compare, String ref) throws IOException
- Throws:
IOException
-
roundTripTest
protected <T> T roundTripTest(T data, BiConsumer<T,Path> out, Function<Path,T> in, BiConsumer<InputStream,InputStream> compare, String ref) throws IOException
- Throws:
IOException
-
-