Hey guys i have a problem, I would like to assert that when i input 2 specific strings that an array is returned. I want to use the assert statement and parameterized testing to do this however my current assert statement is showing an error, iv placed my code below please help:
import IT_chatbot.drop_course;
@RunWith(Parameterized.class)
public class drop_course_test {
drop_course check;
@Before
public void setUp() throws Exception {
check= new drop_course();
}
private String[] output;
private String input1;
private String input2;
public drop_course_test(String output[],String input1,String input2 )
{
this.output=output;
this.input1=input1;
this.input2=input2;
}
@Parameters
public static Collection testConditions(){
String[] droplist1={"ITE222 Web Development 2","ITE365 Software Quality Management","ITE446 Current Topics in Software Engineering","ITE220 Programming 1"};
return Arrays.asList(new Object [][]{
{droplist1, "216110116","ITE200"},
});
}
@Test
public void test() {
assertEquals(output, drop_course.drop(input1, input2));
}
}
Aucun commentaire:
Enregistrer un commentaire