1234567891011121314151617181920212223242526272829303132333435363738 |
- /**
- * Created by leon on 1/10/18.
- */
- import org.junit.*;
-
- import javax.swing.*;
-
- public class ProductTest {
-
- private Product televisions = new Product("Sony", 2000, 200);
-
-
-
- @Test
- public void setIdTest(){
- String expected = "Sony";
- String actual = televisions.getID();
-
- Assert.assertEquals(expected, actual);
- }
- @Test
- public void setPriceTest(){
- int expected = 2000;
- int actual = televisions.getPrice();
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void setQuantityTest(){
- televisions.setQuantity(1000);
- int expected = 1000;
- int actual = televisions.getQuantity();
- Assert.assertEquals(expected, actual);
- }
-
- }
-
|