-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestLogic.java
More file actions
30 lines (26 loc) · 635 Bytes
/
TestLogic.java
File metadata and controls
30 lines (26 loc) · 635 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package Codes;
import org.testng.Assert;
import org.testng.annotations.Test;
public class TestLogic {
@Test
public void testAddTwoIntegers() {
Logic logic = new Logic();
int expected = 30;
int result = logic.add(10, 20);
Assert.assertEquals(result, expected);
}
@Test
public void testAddTwoString() {
Logic logic = new Logic();
int expected = 30;
int result = logic.add("10", "20");
Assert.assertEquals(result, expected);
}
@Test
public void testAddTwoStringChars() {
Logic logic = new Logic();
int expected = 10;
int result = logic.add("ten", "twenty");
Assert.assertEquals(result, expected);
}
}