コード例 #1
0
ファイル: GenQuestion.java プロジェクト: youp911/modelibra
 /**
  * Gets product.
  *
  * @return product
  */
 public Product getProduct() {
   if (product == null) {
     Website website = (Website) getModel();
     Products products = website.getProducts();
     if (productOid != null) {
       product = products.getProduct(productOid);
     }
   }
   return product;
 }
コード例 #2
0
 @BeforeClass
 public static void beforeTests() throws Exception {
   Website website = TwoadwTest.getSingleton().getTwoadw().getWebsite();
   products = website.getProducts();
   sampleProduct01 = products.createProduct("001", "Product1");
   sampleProduct02 = products.createProduct("002", "Product2");
   sampleProduct03 = products.createProduct("003", "Product3");
   customers = website.getCustomers();
   sampleCustomer = customers.createCustomer("007", "jb", "Bond", "James", "*****@*****.**");
   addresses = sampleCustomer.getAddresss();
   sampleAddress =
       addresses.createAddress(
           sampleCustomer, "99 street", "city", "zipCode", "state", "country", "telephone");
   invoices = sampleAddress.getInvoices();
   sampleInvoice01 = invoices.createInvoice(sampleAddress, "001");
   sampleInvoice02 = invoices.createInvoice(sampleAddress, "002");
   sampleInvoice03 = invoices.createInvoice(sampleAddress, "003");
 }