Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. package com.dokimi.tests.ui;
  2.  
  3. import org.testng.annotations.DataProvider;
  4. import org.testng.annotations.Test;
  5.  
  6. public class TestClass {
  7. private String dob = "xyz";
  8.  
  9.  
  10. public String getDob() {
  11. return dob;
  12. }
  13.  
  14. @DataProvider
  15. public Object[][] test() {
  16. TestClass test = new TestClass();
  17. return new Object[][]{
  18. {"prem", "kumar", test}
  19. };
  20. }
  21.  
  22. @Test(dataProvider = "test")
  23. public void testing(String firstname, String secondName, TestClass test) {
  24. System.out.println("First Name::" + firstname);
  25. System.out.println("Second Name::" + secondName);
  26. System.out.println("Test Object::" + test.getDob());
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement