-
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#130 multiname: add support in saving
- Loading branch information
Showing
6 changed files
with
49 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.poiji.deserialize; | ||
|
||
import com.poiji.bind.Poiji; | ||
import com.poiji.deserialize.model.ConcurrentEntity; | ||
import java.io.File; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
|
||
import static java.util.Collections.singletonList; | ||
import static org.hamcrest.CoreMatchers.equalTo; | ||
import static org.junit.Assert.assertThat; | ||
|
||
@RunWith(Parameterized.class) | ||
public class MultinameTest { | ||
|
||
private final String path; | ||
|
||
public MultinameTest(String path) { | ||
this.path = path; | ||
} | ||
|
||
@Parameterized.Parameters | ||
public static List<String> excel() { | ||
return Arrays.asList("src/test/resources/multiname.xlsx", "src/test/resources/multiname.xls"); | ||
} | ||
|
||
@Test | ||
public void read() { | ||
final List<ConcurrentEntity> expected = singletonList(new ConcurrentEntity().setPrimitiveLong(1).setText("1")); | ||
|
||
final List<ConcurrentEntity> actual = Poiji.fromExcel(new File(path), ConcurrentEntity.class); | ||
|
||
assertThat(actual, equalTo(expected)); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.