我目前正在尝试学习JUnit测试。我想测试第一个自定义'TestUnit'类,但IDE告诉我无法解析符号'TestUnit'。我该怎么做才能解决此错误?
TestUnit类:
data = {'Name':['A', 'B', 'C', 'D'], 'Age':[20, 21, 19, 18], 'Income':[202, 213, 194, 185]}
df = pd.DataFrame(data)
menu=Select(title="Columns:", value=df.columns[0], options=list(df.columns.values))
def showData(df):
source = ColumnDataSource(df)
columns = df[[menu.value]]
data_table = DataTable(source=source, columns=columns,width=900,fit_columns=True)
return vform(data_table)
show(column(menu,showData(df)))
和pom.xml
package test.lessons.purejava;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class TestUnit {
@Test
public void testAdd(){
String string = "Test unit works";
assertEquals("Test unit works", string);
}
@Test
public void concatTest(){
Concatenation concatenation = new Concatenation();
String result = concatenation.concat("Hello", " World");
assertEquals("Hello World", result);
}
}