Beispiel #1
0
  @SuppressWarnings("deprecation")
  @Test
  public void promoionGetListStore() {
    /**
     * requestData format { reqData:{ store_number:"@" }, reqCode:"@" } responseData format {
     * resData:[ promotion:{ promotion_name:"@", promotion_contents:"@" } ] resCode:"@" }
     */
    Store testStore = storeFactory.makeStoreEntity(9998, "준범헤어");
    this.storeRepository.save(testStore);
    testStore.setPromotion(storeFactory.makePromotion("getlist", "getlist"));
    this.storeRepository.save(testStore);

    Store store = this.storeRepository.findOne((long) 9998);
    Promotion promotion = store.getPromotion();
    Assert.assertEquals("getlist", promotion.getPromotion_contents());
    Assert.assertEquals("getlist", promotion.getPromotion_name());
  }
Beispiel #2
0
 public Store makeStoreEntity(long storeNum, String storeName) {
   Store store = new Store();
   store.setStore_number(storeNum);
   store.setStore_name(storeName);
   return store;
 }