shivadorepally / junitparams

Automatically exported from code.google.com/p/junitparams
0 stars 0 forks source link

Does not recognize empty string at the end of the data row #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm using the following test that should eneter empty string for the last 
parameter.

@Test
@FileParameters("c:/TrustedCloud/WrongCredentials.csv")
public void errorMessageExpected(String userID, String password,
String oneTimePassword)

with the data

, ibm, 12345
wrong, ibm, 12345
pa@trustedcloud.com, , 12345
pa@trustedcloud.com, wrong, 12345
pa@trustedcloud.com, ibm, 
pa@trustedcloud.com, ibm, wrong
, , 

I need to test application when some fields are empty.

I'm getting the following exceptions 
for the row 5

Caused by: java.lang.IllegalArgumentException: Number of parameters inside 
@Parameters annotation doesn't match the number of test method parameters.
There are 2 parameters in annotation, while there's 3 parameters in the 
errorMessageExpected method.
for the row 7

Caused by: java.lang.IllegalArgumentException: Number of parameters inside 
@Parameters annotation doesn't match the number of test method parameters.
There are 0 parameters in annotation, while there's 3 parameters in the 
errorMessageExpected method.

Original issue reported on code.google.com by vladimir...@hotmail.com on 29 Jun 2012 at 6:42

GoogleCodeExporter commented 8 years ago

Original comment by lipinski...@gmail.com on 14 Dec 2012 at 4:25

GoogleCodeExporter commented 8 years ago
Hi, Pawel:

Great to see that you returned to JUnitParams!

Could you please modify code to allow the first row in the data files to be the 
column headers?

Name, Address, City
data1, data2, data3

Please let me know when you upgrade the code for download. The current file for 
download is dated to May 2012.

Original comment by vladimir...@hotmail.com on 14 Dec 2012 at 7:00