Skip to content

Commit

Permalink
BenriWorkbookFactoryTestの追加
Browse files Browse the repository at this point in the history
  • Loading branch information
webarata3 committed May 26, 2017
1 parent d4b6daf commit 0407885
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/test/java/link/webarata3/poi/BenriWorkbookFactoryTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package link.webarata3.poi;

import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;

import java.io.File;
import java.nio.file.Files;

public class BenriWorkbookFactoryTest {
@Rule
public TemporaryFolder tempFolder = new TemporaryFolder();

@Test
public void 正常系_create_inputStream() throws Exception {
File file = TestUtil.getTempWorkbookFile(tempFolder, "book1.xlsx");
BenriWorkbook bwb = BenriWorkbookFactory.create(Files.newInputStream(file.toPath()));
}

@Test
public void 正常系_create_fileName() throws Exception {
File file = TestUtil.getTempWorkbookFile(tempFolder, "book1.xlsx");
BenriWorkbook bwb = BenriWorkbookFactory.create(file.getCanonicalPath());
}
}
Binary file removed src/test/resources/link/webarata3/poi/~$book1.xlsx
Binary file not shown.

0 comments on commit 0407885

Please sign in to comment.