public void RemoveSupplierTest() { Factory factory = Factory.GetInstance(); string supplierCode = "RIBI-100"; // TODO: Initialize to an appropriate value try { ISupplierSvc supplierSvc = (ISupplierSvc)factory.GetService(typeof(ISupplierSvc).Name); supplierSvc.RemoveSupplier(supplierCode);//adds product } catch (Exception e) { Assert.Fail(e.ToString());//force fail of test } }
//removes a supplier public void RemoveSupplier(string supplierCode) { try { ISupplierSvc supplierSvc = (ISupplierSvc)GetService(typeof(ISupplierSvc).Name); supplierSvc.RemoveSupplier(supplierCode); } catch (ServiceLoadException e) { throw new SupplierMgrException(e.Message); } catch (DBProcessingException e) { throw new SupplierMgrException(e.Message); } }