Skip to content

Commit e33f867

Browse files
STSSTS
authored andcommitted
change files location
1 parent 98ab3aa commit e33f867

6 files changed

Lines changed: 4 additions & 120 deletions

File tree

apache-poi/excelformula/.gitignore

Lines changed: 0 additions & 34 deletions
This file was deleted.

apache-poi/excelformula/pom.xml

Lines changed: 0 additions & 57 deletions
This file was deleted.

apache-poi/excelformula/src/main/java/com/bealdung/poi/excelformula/ExcelformulaApplication.java

Lines changed: 0 additions & 13 deletions
This file was deleted.

apache-poi/excelformula/src/main/resources/application.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

apache-poi/excelformula/src/main/java/com/bealdung/poi/excelformula/ExcelFormula.java renamed to apache-poi/src/main/java/com/baeldung/poi/excel/setFormula/ExcelFormula.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
package com.bealdung.poi.excelformula;
1+
package com.baeldung.poi.excel.setFormula;
22

33
import org.apache.poi.ss.usermodel.CellValue;
44
import org.apache.poi.xssf.usermodel.XSSFCell;
55
import org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator;
66
import org.apache.poi.xssf.usermodel.XSSFSheet;
77
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
8-
import org.springframework.stereotype.Component;
98

109
import java.io.IOException;
1110
import java.util.List;
1211

13-
@Component
1412
public class ExcelFormula {
1513
XSSFWorkbook excel;
1614
public XSSFSheet inserData(List<Integer> dataList) {

apache-poi/excelformula/src/test/java/com/bealdung/poi/excelformula/ExcelformulaApplicationTests.java renamed to apache-poi/src/test/java/com/baeldung/poi/excel/setFormula/ExcelFormulaUnitTest.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
1-
package com.bealdung.poi.excelformula;
1+
package com.baeldung.poi.excel.setFormula;
22

33
import org.apache.poi.ss.util.CellReference;
44
import org.apache.poi.xssf.usermodel.XSSFSheet;
55
import org.junit.Assert;
66
import org.junit.jupiter.api.Test;
7-
import org.junit.runner.RunWith;
8-
import org.springframework.beans.factory.annotation.Autowired;
9-
import org.springframework.boot.test.context.SpringBootTest;
10-
import org.springframework.test.context.junit4.SpringRunner;
117

128
import java.io.IOException;
139
import java.util.Arrays;
1410
import java.util.List;
1511

16-
@RunWith(SpringRunner.class)
17-
@SpringBootTest
18-
class ExcelformulaApplicationTests {
19-
@Autowired
20-
private ExcelFormula excelFormula;
21-
12+
class ExcelFormulaUnitTest {
2213
@Test
2314
void givenExcelData_whenSetAndEvaluateFormula() throws IOException {
15+
ExcelFormula excelFormula = new ExcelFormula();
2416
List<Integer> data = Arrays.asList(2, 5, 10, 15, 7, 9);
2517
XSSFSheet sheet = excelFormula.inserData(data);
2618
int result = 0;
@@ -34,5 +26,4 @@ void givenExcelData_whenSetAndEvaluateFormula() throws IOException {
3426
int resultValue = (int) excelFormula.setFormula(sumFormula);
3527
Assert.assertEquals("The results are the same!", resultValue , result);
3628
}
37-
3829
}

0 commit comments

Comments
 (0)