在SpringBoot项目上使用DBUNIT运行Junit测试时出错

Nunyet de CanCalçada

我有一个Junit测试,在运行它时出现以下错误:

org.dbunit.dataset.NoSuchColumnException: AUTORISATION_BONANZA.ORGANISATION_ID -  (Non-uppercase input column: ORGANISATION_ID) in ColumnNameToIndexes cache map. Note that the map's column names are NOT case sensitive.

实体

@Entity
@NoArgsConstructor
@Data
public class AutorisationBonanza implements Serializable {

    @Id
    @Column(name = "AUTORISATION_BONANZA_ID")
    private Long autorisationBonanzaId;
    private String pol;
    private String nomom;


    @ManyToOne
    @JoinColumn(name = "ORGANISATION_ID")
    private Organisation organisation;


}

数据集:

<AUTORISATION_BONANZA
        AUTORISATION_BONANZA_ID="1"
        POL="NOM"
        NOMOM="PRENOM"
        ORGANISATION_ID="1"
        />

@Entity
@NoArgsConstructor
@Data
public class Organisation implements Serializable {

    @Id
    @Column(name = "ORGANISATION_ID")
    private Long organisationId;
    private String code;



}
大卫·阿尔瓦雷斯·图德拉

尝试将其添加到属性文件中:

org.dbunit.database.IMetadataHandler.implClassName=org.dbunit.ext.mysql.MySqlMetadataHandler

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

在Eclipse中运行junit测试用例时出错

尝试运行基于Maven的简单springboot项目时出错

在mean.js项目中运行npm测试时出错

在Maven / Springboot项目中运行测试时出现MojoFailureException(NoClassDefFound)

使用 assertArrayEquals 使用 JUnit 进行测试时出错

使用基于Gradle的配置时在Android Studio(IntelliJ)上运行简单的JUnit测试

找不到测试-在裸骨Spring Boot Maven项目上运行jUnit 5测试用例时,测试套件为空

在CircleCI上运行Jest时出错:“ npm测试意外终止”

在IntelliJ for OSGi捆绑软件上运行测试时出错

在 alpine docker 容器上运行 selenium 测试时出错

在Azure角色上运行Web API项目时出错

Eclipse-在项目上运行Builder时出错

从Mac上的Pycharm运行全新项目时出错

在新vue项目上运行npm run serve时出错

在Android Eclipse JUnit项目中的各个类上运行原始JUnit测试

使用 youtube API 编译测试项目 xamarin 表单时出错

使用 ApplicationContext 运行 JUnit 测试时禁用 Hazelcast 实例

尝试使用Spring运行jUnit测试时出现NoSuchFieldError

使用Ant运行JUnit测试时出现ClassNotFoundException

使用spring boot和testng运行集成测试时出错

使用React-Testing-Library运行Jest测试时出错

使用 Prisma Migrate 运行集成测试时出错

如何在多模块项目中使用 JUnit5 和 SpringBoot2 通过 gradle 而不是 intelliJ 运行测试

Anypoint studio - 使用 Maven 运行项目时出错

使用SBT运行JUnit测试

使用IntelliJ运行JUnit测试

在构建Java项目时,Maven运行带有junit @Ignore注释的测试

引起:java.lang.NoClassDefFoundError:通过 Arquiilliqn 为 Maven 项目运行 JUnit 测试时无法链接

使用springboot运行集成测试