-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJtestStore.java
More file actions
39 lines (33 loc) · 803 Bytes
/
JtestStore.java
File metadata and controls
39 lines (33 loc) · 803 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
31
32
33
34
35
36
37
38
39
//Bonus#3
package project.pkg151;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
public class JtestStore {
store t;
Employee e;
//assign values
@Before
public void tearDownClass() {
t= new store();
e=new Employee("Abeer",100);
}
//test the right value
@Test
public void testExist() {
boolean d=t.isExist(new products("",0));
assertEquals(false,d);
}
//test the wrong value
@Test
public void testUpdate(){
double t=190.0;
e.UpdateSalary(20);
double a=e.getSalary();
assertNotEquals(t, a);
}
}