SHARE
TWEET

Untitled

a guest Feb 27th, 2020 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Calculator {
  2.  
  3. public double division(String a, String b) {
  4. return Double.parseDouble(a) / Double.parseDouble(b);
  5. }
  6.  
  7. public double sum(String a, String b) {
  8. return Double.parseDouble(a) + Double.parseDouble(b);
  9. }
  10.  
  11. public double difference(String a, String b) {
  12. return Double.parseDouble(a) - Double.parseDouble(b);
  13. }
  14.  
  15. public double multiplication(String a, String b) {
  16. return Double.parseDouble(a) * Double.parseDouble(b);
  17. }
  18.  
  19. }
  20. Ну ты понял, фигня,
  21. я сделал 4 такие теста:
  22. у каждого будет свой файл и своя функция:
  23. @Test(dataProvider = "userDetails")
  24. public void Sumresult(String userName, String password,String res) {
  25. Calculator calc = new Calculator();
  26. Assert.assertEquals(calc.sum(userName, password),Double.parseDouble(res));
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top