forked from cybernobie/Cognizant_Early_Engagement
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomerTest.java
33 lines (26 loc) · 917 Bytes
/
CustomerTest.java
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
31
32
33
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
public class CustomerTest {
//Write the code for testing assertion using JUNIT
Customer customer = new Customer("234567891234", "Abhishek", "Sawant",
"Mumbai", (long) 3210, "[email protected]");
@Test
public void testCustomer_InvalidAadharCardNo(){
assertFalse(customer.isValidAadharNo("123456789123"));
}
@Test
public void testCustomer_ValidAadharCardNo(){
assertTrue(customer.isValidAadharNo("423456789123"));
}
@Test
public void testCustomer_FirstAndLastNameNotEqual(){
assertNotEquals(customer.getFirstName(), customer.getLastName());
}
@Test
public void testCustomer_EmailIdNotNull(){
assertNotNull(customer.getEmailId());
}
}