* BAEL-1712 Fix tests in libraries project -Renamed 45 test files to standard naming conventions. -Updated maven dependencies in libraries/pom.xml -Fixed assertion errors in some tests. -Included libraries project back into parent pom.xml * BAEL-1712 Fix tests in libraries project -Downgraded apache maven pmd plugin from 3.9.0 to 3.8 because pmd 6.0.1 present in pmd plugin 3.9.0 was unable to resolve classes having static final inner classes and was resulting into build failure. * BAEL-1712 Fix libraries -Fixed JodaTimeUnitTest
66 lines
1.5 KiB
Java
66 lines
1.5 KiB
Java
package com.baeldung.opencsv;
|
|
|
|
import com.baeldung.opencsv.helpers.Helpers;
|
|
import org.junit.After;
|
|
import org.junit.Before;
|
|
import org.junit.Test;
|
|
|
|
public class OpenCsvIntegrationTest {
|
|
|
|
private Object testReadCsv(Object result) {
|
|
assert (result != null);
|
|
assert (result instanceof String);
|
|
assert (!((String) result).isEmpty());
|
|
System.out.println(result);
|
|
return result;
|
|
}
|
|
|
|
private Object testWriteCsv(Object result) {
|
|
assert (result instanceof String);
|
|
assert (!((String) result).isEmpty());
|
|
return result;
|
|
}
|
|
|
|
@Before
|
|
public void setup() {
|
|
}
|
|
|
|
@Test
|
|
public void positionExampleTest() {
|
|
testReadCsv(Application.simpleSyncPositionBeanExample());
|
|
}
|
|
|
|
@Test
|
|
public void namedColumnExampleTest() {
|
|
testReadCsv(Application.namedSyncColumnBeanExample());
|
|
}
|
|
|
|
@Test
|
|
public void writeCsvUsingBeanBuilderTest() {
|
|
testWriteCsv(Application.writeSyncCsvFromBeanExample());
|
|
}
|
|
|
|
@Test
|
|
public void oneByOneExampleTest() {
|
|
testReadCsv(Application.oneByOneSyncExample());
|
|
}
|
|
|
|
@Test
|
|
public void readAllExampleTest() {
|
|
testReadCsv(Application.readAllSyncExample());
|
|
}
|
|
|
|
@Test
|
|
public void csvWriterOneByOneTest() {
|
|
testWriteCsv(Application.csvWriterSyncOneByOne());
|
|
}
|
|
|
|
@Test
|
|
public void csvWriterAllTest() {
|
|
testWriteCsv(Application.csvWriterSyncAll());
|
|
}
|
|
|
|
@After
|
|
public void close() {
|
|
}
|
|
} |