Ajuda para criar um classe teste
19/05/2020
0
Bom dia estou precisando muito de ajuda sobre Teste Unitário no Intellij.
Estou desenvolvendo a classe Entities e não estou sabendo criar um teste unitário dessa classe, alguém pode me ajudar.
@Entity
@Table(name = "INFO_REG_ARQ_RECBD", schema = "GRLF")
public class InfoRegEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "NUM_REG", columnDefinition = "NUMBER(10,0)", nullable = false)
private Long registerNumber;
@Column(name = "ID_GRP", columnDefinition = "NUMBER", nullable = false)
private Long groupId;
@Column(name = "ID_TRANS", columnDefinition = "NUMBER", nullable = false)
private Long transactionId;
@Column(name = "NUM_ARQ_RECBD", columnDefinition = "NUMBER(10,0)", nullable = false)
private Long fileNumberReceived;
@Column(name = "ID_SIT", columnDefinition = "NUMBER", nullable = false)
private Long situationId;
@Column(name = "HOR_ALT_REG", columnDefinition = "VARCHAR2(70 CHAR)", nullable = true)
private LocalDateTime recordChangeTime;
@Column(name = "COD_USUAR_ALT_REG", columnDefinition = "VARCHAR2(50 CHAR)", nullable = true)
private String registrationChangeUser;
@Column(name = "DES_CONTD_REG", columnDefinition = "VARCHAR2(4000 CHAR)", nullable = false)
private String receivedContent;
@Column(name = "UUID", columnDefinition = "VARCHAR2(36 CHAR)", nullable = true)
private String uuId;
@Column(name = "DES_MOTVO", columnDefinition = "VARCHAR2(100 CHAR)", nullable = true)
private String reasonDescription;
public InfoRegEntity() {
}
public InfoRegEntity(Long groupId, Long transactionId, Long fileNumberReceived, Long situationId,
LocalDateTime recordChangeTime, String registrationChangeUser,
String receivedContent, String uuId, String reasonDescription) {
this.groupId = groupId;
this.transactionId = transactionId;
this.fileNumberReceived = fileNumberReceived;
this.situationId = situationId;
this.recordChangeTime = recordChangeTime;
this.registrationChangeUser = registrationChangeUser;
this.receivedContent = receivedContent;
this.uuId = uuId;
this.reasonDescription = reasonDescription;
}
public Long getRegisterNumber() {
return this.registerNumber;
}
public void setRegisterNumber(Long registerNumber) {
this.registerNumber = registerNumber;
}
public Long getGroupId() {
return groupId;
}
public void setGroupId(Long groupId) {
this.groupId = groupId;
}
public Long getTransactionId() {
return transactionId;
}
public void setTransactionId(Long transactionId) {
this.transactionId = transactionId;
}
public Long getFileNumberReceived() {
return fileNumberReceived;
}
public void setFileNumberReceived(Long fileNumberReceived) {
this.fileNumberReceived = fileNumberReceived;
}
public Long getSituationId() {
return situationId;
}
public void setSituationId(Long situationId) {
this.situationId = situationId;
}
public LocalDateTime getRecordChangeTime() {
return recordChangeTime;
}
public void setRecordChangeTime(LocalDateTime recordChangeTime) {
this.recordChangeTime = recordChangeTime;
}
public String getRegistrationChangeUser() {
return registrationChangeUser;
}
public void setRegistrationChangeUser(String registrationChangeUser) {
this.registrationChangeUser = registrationChangeUser;
}
public String getReceivedContent() {
return receivedContent;
}
public void setReceivedContent(String receivedContent) {
this.receivedContent = receivedContent;
}
public String getUuId() {
return uuId;
}
public void setUuId(String uuId) {
this.uuId = uuId;
}
public String getReasonDescription() {
return reasonDescription;
}
public void setReasonDescription(String reasonDescription) {
this.uuId = reasonDescription;
}
}
Estou desenvolvendo a classe Entities e não estou sabendo criar um teste unitário dessa classe, alguém pode me ajudar.
@Entity
@Table(name = "INFO_REG_ARQ_RECBD", schema = "GRLF")
public class InfoRegEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "NUM_REG", columnDefinition = "NUMBER(10,0)", nullable = false)
private Long registerNumber;
@Column(name = "ID_GRP", columnDefinition = "NUMBER", nullable = false)
private Long groupId;
@Column(name = "ID_TRANS", columnDefinition = "NUMBER", nullable = false)
private Long transactionId;
@Column(name = "NUM_ARQ_RECBD", columnDefinition = "NUMBER(10,0)", nullable = false)
private Long fileNumberReceived;
@Column(name = "ID_SIT", columnDefinition = "NUMBER", nullable = false)
private Long situationId;
@Column(name = "HOR_ALT_REG", columnDefinition = "VARCHAR2(70 CHAR)", nullable = true)
private LocalDateTime recordChangeTime;
@Column(name = "COD_USUAR_ALT_REG", columnDefinition = "VARCHAR2(50 CHAR)", nullable = true)
private String registrationChangeUser;
@Column(name = "DES_CONTD_REG", columnDefinition = "VARCHAR2(4000 CHAR)", nullable = false)
private String receivedContent;
@Column(name = "UUID", columnDefinition = "VARCHAR2(36 CHAR)", nullable = true)
private String uuId;
@Column(name = "DES_MOTVO", columnDefinition = "VARCHAR2(100 CHAR)", nullable = true)
private String reasonDescription;
public InfoRegEntity() {
}
public InfoRegEntity(Long groupId, Long transactionId, Long fileNumberReceived, Long situationId,
LocalDateTime recordChangeTime, String registrationChangeUser,
String receivedContent, String uuId, String reasonDescription) {
this.groupId = groupId;
this.transactionId = transactionId;
this.fileNumberReceived = fileNumberReceived;
this.situationId = situationId;
this.recordChangeTime = recordChangeTime;
this.registrationChangeUser = registrationChangeUser;
this.receivedContent = receivedContent;
this.uuId = uuId;
this.reasonDescription = reasonDescription;
}
public Long getRegisterNumber() {
return this.registerNumber;
}
public void setRegisterNumber(Long registerNumber) {
this.registerNumber = registerNumber;
}
public Long getGroupId() {
return groupId;
}
public void setGroupId(Long groupId) {
this.groupId = groupId;
}
public Long getTransactionId() {
return transactionId;
}
public void setTransactionId(Long transactionId) {
this.transactionId = transactionId;
}
public Long getFileNumberReceived() {
return fileNumberReceived;
}
public void setFileNumberReceived(Long fileNumberReceived) {
this.fileNumberReceived = fileNumberReceived;
}
public Long getSituationId() {
return situationId;
}
public void setSituationId(Long situationId) {
this.situationId = situationId;
}
public LocalDateTime getRecordChangeTime() {
return recordChangeTime;
}
public void setRecordChangeTime(LocalDateTime recordChangeTime) {
this.recordChangeTime = recordChangeTime;
}
public String getRegistrationChangeUser() {
return registrationChangeUser;
}
public void setRegistrationChangeUser(String registrationChangeUser) {
this.registrationChangeUser = registrationChangeUser;
}
public String getReceivedContent() {
return receivedContent;
}
public void setReceivedContent(String receivedContent) {
this.receivedContent = receivedContent;
}
public String getUuId() {
return uuId;
}
public void setUuId(String uuId) {
this.uuId = uuId;
}
public String getReasonDescription() {
return reasonDescription;
}
public void setReasonDescription(String reasonDescription) {
this.uuId = reasonDescription;
}
}
Fernando Silva
Curtir tópico
+ 0
Responder
Clique aqui para fazer login e interagir na Comunidade :)