productDB = datafolder;
productReport = reportfolder;
}
public void testDataEntry() {
ProductManager dataObjectManager = new ProductManager(productDB, productDBFormat);
//create new product
Product dataObject1 = new Product("CLO/1","Centenary Jumper","A really nice momento",315,(float) 21.45,"1234",10,100);
try {
dataObjectManager.addProduct(dataObject1);
} catch (AppException ex) {
//Logger.getLogger(TestProduct.class.getName()).log(Level.SEVERE, null, ex);
}
Product dataObject2 = new Product("MUG/1","Centenary Mug","A really nice mug this time",525,(float) 10.25,"9876",25,150);
try {
dataObjectManager.addProduct(dataObject2);
} catch (AppException ex) {
//Logger.getLogger(TestProduct.class.getName()).log(Level.SEVERE, null, ex);
}
Product dataObject3 = new Product("STA/1","NUS Pen","A really cute blue pen",768,(float) 5.75,"123459876",50,250);
try {
dataObjectManager.addProduct(dataObject3);
} catch (AppException ex) {
//Logger.getLogger(TestProduct.class.getName()).log(Level.SEVERE, null, ex);
}
Product dataObject4 = new Product("STA/2","NUS Notepad","Great notepad for those lectures",1000,(float) 3.15,"6789",25,75);
try {
dataObjectManager.addProduct(dataObject3);
} catch (AppException ex) {
//Logger.getLogger(TestProduct.class.getName()).log(Level.SEVERE, null, ex);
}
dataObjectManager = null;