Package org.apache.wicket.spring

Examples of org.apache.wicket.spring.Bean


   */
  @Test
  public void beanExists() throws Exception
  {
    // add dependency bean
    ctx.putBean("bean", new Bean());
    AnnotatedBeanRequired page;

    // first test with standard behavior (required = true)
    tester.startPage(page = new AnnotatedBeanRequired());
    assertNotNull(page.getBean());
View Full Code Here


   */
  @Test
  public void beanExistsDifferentName() throws Exception
  {
    // add dependency beans of the same type
    ctx.putBean("mrBean", new Bean());
    ctx.putBean("theBean", new Bean());

    // with no name specified we get IllegalStateException
    try
    {
      tester.startPage(new AnnotatedBeanRequired());
View Full Code Here

   * https://issues.apache.org/jira/browse/WICKET-4149
   */
  @Test
  public void beanInjectedInBehavior()
  {
    ctx.putBean("mrBean", new Bean());

    // with no name specified we get IllegalStateException
    Page page = tester.startPage(new AnnotatedFieldInBehaviorPage());
    TestBehavior behavior = page.getBehaviors(TestBehavior.class).get(0);
    assertNotNull(behavior.getBean());
View Full Code Here

   */
  @Test
  public void beanExists() throws Exception
  {
    // add dependency bean
    ctx.putBean("bean", new Bean());
    AnnotatedBeanRequired page;

    // first test with standard behavior (required = true)
    tester.startPage(page = new AnnotatedBeanRequired());
    assertNotNull(page.getBean());
View Full Code Here

   */
  @Test
  public void beanExistsDifferentName() throws Exception
  {
    // add dependency beans of the same type
    ctx.putBean("mrBean", new Bean());
    ctx.putBean("theBean", new Bean());

    // with no name specified we get IllegalStateException
    try
    {
      tester.startPage(new AnnotatedBeanRequired());
View Full Code Here

   */
  @Test
  public void beanExists() throws Exception
  {
    // add dependency bean
    ctx.putBean("bean", new Bean());
    AnnotatedBeanRequired page;

    // first test with standard behavior (required = true)
    tester.startPage(page = new AnnotatedBeanRequired());
    assertNotNull(page.getBean());
View Full Code Here

   */
  @Test
  public void beanExistsDifferentName() throws Exception
  {
    // add dependency beans of the same type
    ctx.putBean("mrBean", new Bean());
    ctx.putBean("theBean", new Bean());

    // with no name specified we get IllegalStateException
    try
    {
      tester.startPage(new AnnotatedBeanRequired());
View Full Code Here

   * https://issues.apache.org/jira/browse/WICKET-4149
   */
  @Test
  public void beanInjectedInBehavior()
  {
    ctx.putBean("mrBean", new Bean());

    // with no name specified we get IllegalStateException
    Page page = tester.startPage(new AnnotatedFieldInBehaviorPage());
    TestBehavior behavior = page.getBehaviors(TestBehavior.class).get(0);
    assertNotNull(behavior.getBean());
View Full Code Here

   */
  @Test
  public void beanExists() throws Exception
  {
    // add dependency bean
    ctx.putBean("bean", new Bean());
    AnnotatedBeanRequired page;

    // first test with standard behavior (required = true)
    tester.startPage(page = new AnnotatedBeanRequired());
    assertNotNull(page.getBean());
View Full Code Here

   */
  @Test
  public void beanExistsDifferentName() throws Exception
  {
    // add dependency beans of the same type
    ctx.putBean("mrBean", new Bean());
    ctx.putBean("theBean", new Bean());

    // with no name specified we get IllegalStateException
    try
    {
      tester.startPage(new AnnotatedBeanRequired());
View Full Code Here

TOP

Related Classes of org.apache.wicket.spring.Bean

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.