持续集成之路??数据访问层的单元测试(续)
作者:网络转载 发布时间:[ 2013/7/19 13:21:56 ] 推荐标签:
package com.noyaxe.myapp.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name = "floor")
public class Floor extends IdEntity {
private Integer floorNum;
private Building building;
@Column(name = "floor_num")
public Integer getFloorNum() {
return floorNum;
}
public void setFloorNum(Integer floorNum) {
this.floorNum = floorNum;
}
@ManyToOne(optional = false)
@JoinColumn(name = "building")
public Building getBuilding() {
return building;
}
public void setBuilding(Building building) {
this.building = building;
}
}
被测试的FloorDao:
package com.noyaxe.myapp.repository;
import com.noyaxe.myapp.entity.Floor;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface FloorDao extends JpaSpecificationExecutor<Floor>, PagingAndSortingRepository<Floor, Long> {
public Floor findByBuildingNameAndFloorNum(String building, Integer floorNum);
public List<Floor> findByBuildingName(String building);
}
相关推荐
更新发布
功能测试和接口测试的区别
2023/3/23 14:23:39如何写好测试用例文档
2023/3/22 16:17:39常用的选择回归测试的方式有哪些?
2022/6/14 16:14:27测试流程中需要重点把关几个过程?
2021/10/18 15:37:44性能测试的七种方法
2021/9/17 15:19:29全链路压测优化思路
2021/9/14 15:42:25性能测试流程浅谈
2021/5/28 17:25:47常见的APP性能测试指标
2021/5/8 17:01:11