Package org.springframework.tests.sample.beans

Examples of org.springframework.tests.sample.beans.Pet


    assertAttributeNotPresent(output, "checked");
  }

  public void testCollectionOfPets() throws Exception {
    this.tag.setPath("pets");
    this.tag.setValue(new Pet("Rudiger"));

    int result = this.tag.doStartTag();
    assertEquals(Tag.SKIP_BODY, result);

    String output = getOutput();
View Full Code Here


    assertEquals("checked", checkboxElement.attribute("checked").getValue());
  }

  public void testCollectionOfPetsNotSelected() throws Exception {
    this.tag.setPath("pets");
    this.tag.setValue(new Pet("Santa's Little Helper"));

    int result = this.tag.doStartTag();
    assertEquals(Tag.SKIP_BODY, result);

    String output = getOutput();
View Full Code Here

  @Override
  protected TestBean createTestBean() {
    this.bean = new TestBean();
    bean.setSex("M");
    bean.setMyFloat(getFloat());
    bean.setPets(Collections.singletonList(new Pet("Rudiger")));
    return bean;
  }
View Full Code Here

    colours.add(Colour.BLUE);
    colours.add(Colour.RED);
    colours.add(Colour.GREEN);

    List pets = new ArrayList();
    pets.add(new Pet("Rudiger"));
    pets.add(new Pet("Spot"));
    pets.add(new Pet("Fluffy"));
    pets.add(new Pet("Mufty"));

    this.bean = new TestBean();
    this.bean.setDate(getDate());
    this.bean.setName("Rob Harrop");
    this.bean.setJedi(true);
View Full Code Here

    colours.add(Colour.BLUE);
    colours.add(Colour.RED);
    colours.add(Colour.GREEN);

    List pets = new ArrayList();
    pets.add(new Pet("Rudiger"));
    pets.add(new Pet("Spot"));
    pets.add(new Pet("Fluffy"));
    pets.add(new Pet("Mufty"));

    Set someObjects = new HashSet();
    someObjects.add(new ItemPet("PET1"));
    someObjects.add(new ItemPet("PET2"));
View Full Code Here

    assertNull(checkboxElement.attribute("checked"));
  }

  public void testCollectionOfPets() throws Exception {
    this.tag.setPath("pets");
    this.tag.setValue(new Pet("Rudiger"));

    int result = this.tag.doStartTag();
    assertEquals(Tag.SKIP_BODY, result);

    String output = getOutput();
View Full Code Here

    assertEquals("checked", checkboxElement.attribute("checked").getValue());
  }

  public void testCollectionOfPetsNotSelected() throws Exception {
    this.tag.setPath("pets");
    this.tag.setValue(new Pet("Santa's Little Helper"));

    int result = this.tag.doStartTag();
    assertEquals(Tag.SKIP_BODY, result);

    String output = getOutput();
View Full Code Here

    colours.add(Colour.BLUE);
    colours.add(Colour.RED);
    colours.add(Colour.GREEN);

    List pets = new ArrayList();
    pets.add(new Pet("Rudiger"));
    pets.add(new Pet("Spot"));
    pets.add(new Pet("Fluffy"));
    pets.add(new Pet("Mufty"));

    List someList = new ArrayList();
    someList.add("foo");
    someList.add("bar");
View Full Code Here

    assertEquals("Foo", foo);

    String bar = ctx.getBean("bar", String.class);
    assertEquals("Bar", bar);

    Pet pet = ctx.getBean(Pet.class);
    assertNotNull("pet", pet);
    assertEquals("Dogbert", pet.getName());

    Employee employee = ctx.getBean(Employee.class);
    assertNotNull("employee", employee);
    assertEquals("Dilbert", employee.getName());
    assertEquals("???", employee.getCompany());
View Full Code Here

    return employee;
  }

  @Bean
  public Pet pet() {
    return new Pet("Fido");
  }
View Full Code Here

TOP

Related Classes of org.springframework.tests.sample.beans.Pet

Copyright © 2018 www.massapicom. 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.