Examples of Food


Examples of test.mixed.Food

  public static ApplicationContext applicationContext = new XmlApplicationContext("mixed-config.xml");

  @Test
  public void testInject() {
    FoodService2 foodService2 = applicationContext.getBean("foodService2");
    Food food = foodService2.getFood("apple");
    log.debug(food.getName());
    Assert.assertThat(food.getPrice(), is(5.3));
   
    FoodService foodService = applicationContext.getBean(FoodService.class);
    food = foodService.getFood("strawberry");
    log.debug(food.getName());
    Assert.assertThat(food.getPrice(), is(10.00));
  }
View Full Code Here

Examples of test.mixed.Food

@Controller
public class FoodController {

  @RequestMapping(value = "/food")
  public View getFood(HttpServletRequest request) {
    Food food = new Food();
    food.setName("orange");
    food.setPrice(3.5);
    request.setAttribute("fruit", food);
    return new JspView("/food.jsp");
  }
View Full Code Here

Examples of tyrelion.itemsystem.Food

      boolean stackable = e.getAttribute("stackable").getBooleanValue();
      String imageWorld = e.getChildTextNormalize("imageWorld");
      String imageInv = e.getChildTextNormalize("imageInv");
     
      if ("food".equals(type)) {
        item = new Food(id, name, new Image(imageWorld), new Image(imageInv), stackable);
      } else if ("weapon".equals(type)) {
        item = new Weapon(id, name, new Image(imageWorld), new Image(imageInv), stackable);
      }
      items[i] = item;
    }
View Full Code Here

Examples of warbot.kernel.Food

        posToRef = bases.firstEntry().getValue().pos;
      }

    nbEnnemis = 0;
    nbNakama = 0;
    Food food = null;
    Percept[] perception = getPercepts();

    for (Percept element : perception) {
      String elmType = element.getPerceptType();
      Boolean foe = !element.getTeam().equals(getTeam());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.