Package org.apache.ibatis.domain.blog

Examples of org.apache.ibatis.domain.blog.Blog


  @Test
  public void shouldExecuteBoundSelectOneBlogStatementWithConstructorUsingXMLConfig() {
    SqlSession session = sqlSessionFactory.openSession();
    try {
      BoundBlogMapper mapper = session.getMapper(BoundBlogMapper.class);
      Blog blog = mapper.selectBlogByIdUsingConstructor(1);
      assertEquals(1, blog.getId());
      assertEquals("Jim Business", blog.getTitle());
      assertNotNull("author should not be null", blog.getAuthor());
      List<Post> posts = blog.getPosts();
      assertTrue("posts should not be empty", posts != null && !posts.isEmpty());
    } finally {
      session.close();
    }
  }
View Full Code Here


  @Test
  public void shouldSelectBlogWithDefault30ParamNames() {
    SqlSession session = sqlSessionFactory.openSession();
    try {
      BoundBlogMapper mapper = session.getMapper(BoundBlogMapper.class);
      Blog blog = mapper.selectBlogByDefault30ParamNames(1, "Jim Business");
      assertNotNull(blog);
    } finally {
      session.close();
    }
  }
View Full Code Here

  @Test
  public void shouldSelectBlogWithDefault31ParamNames() {
    SqlSession session = sqlSessionFactory.openSession();
    try {
      BoundBlogMapper mapper = session.getMapper(BoundBlogMapper.class);
      Blog blog = mapper.selectBlogByDefault31ParamNames(1, "Jim Business");
      assertNotNull(blog);
    } finally {
      session.close();
    }
  }
View Full Code Here

  @Test
  public void shouldSelectBlogWithAParamNamedValue() {
    SqlSession session = sqlSessionFactory.openSession();
    try {
      BoundBlogMapper mapper = session.getMapper(BoundBlogMapper.class);
      Blog blog = mapper.selectBlogWithAParamNamedValue("id", 1, "Jim Business");
      assertNotNull(blog);
    } finally {
      session.close();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.ibatis.domain.blog.Blog

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.