-2

here i am comparing two list and will store the result in Boolean but somehow the list is same still its storing the false.

img

public void verify_export_Functionality() throws IOException 
    {   
        boolean b = true;
        b = Testfactory.read_element_file(models).equals(ExcelUtils.readdata("Model Export.xlsx"));
        Assert.assertTrue(b);   
        System.out.println("Pass");
    }

here is my list is same also

[test,  test1, test, tsest]
[test, test1, test, tsest]
Andrei Suvorkov
  • 5,559
  • 5
  • 22
  • 48

1 Answers1

4

The second element in the list are different,one has space test1and the other do not have test1,that's the reason,so you need to check other parts of your code to eliminate the duplicate space

flyingfox
  • 13,414
  • 3
  • 24
  • 39
  • 1
    actually a comment should be better...and there is an answer in the comment already by Paul Wellner Bou. any way, upvoted ~ – Hearen Jul 25 '18 at 09:55
  • @Hearen sorry for that,but when I typing the answer,the comment has not appear – flyingfox Jul 25 '18 at 09:55