腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
2
回答
使用
hamcrest
的
Assert.fail
等效
项
java
、
unit-testing
、
junit
、
hamcrest
我为
Assert.fail
使用
JUnit,但我不知道什么是
Hamcrest
等效
项
。有人知道吗?
浏览 19
提问于2019-06-26
得票数 3
回答已采纳
3
回答
将断言与junit一起
使用
java
、
junit
、
junit4
从表中,我获得了字符串
的
列表,并希望检查当为val != "A"时,表
的
列表中是否存在字符串"x":{ { //need to check here the string exists in the list using assertTrue
浏览 0
提问于2011-09-16
得票数 1
回答已采纳
2
回答
mockito-core和mockito-all有什么区别?
mockito
莫基托-核心和全部
的
区别?例如,如果我只
使用
mockito-core,我将不能做什么?
浏览 1
提问于2019-03-09
得票数 23
回答已采纳
2
回答
使用
@Test和expected
junit
、
junit4
在我
的
Junit测试中,只有当IOexception被测试对象抛出时,我才有一个测试用例必须失败。因此,如果我
的
被测试对象抛出IllegalStateException (或其他错误或异常),那么我
的
测试用例是可以
的
,但是如果我
的
被测试对象抛出IOexception,那么我
的
测试用例必须失败。
浏览 5
提问于2016-11-01
得票数 1
回答已采纳
1
回答
有工具
使用
hamcrest
注释吗?
java
、
junit
、
jmock
、
hamcrest
今天,我坐下来写了一个matcher,并决定快速查看jmock文档,以刷新我对这个过程
的
记忆,并注意到了对org.
hamcrest
.Factory注释
的
引用。注释
的
文档声明。标记
Hamcrest
静态工厂方法,以便工具识别它们。工厂方法与命名构造函数
等效
。 是否有任何工具实际
使用
此批注?
浏览 7
提问于2010-07-29
得票数 11
回答已采纳
3
回答
Org.
hamcrest
.Matcher.describeMismatch- java.lang.NoSuchMethodError: JMock()
java
、
jmock
、
hamcrest
我理解解决方案是以某种方式确保在
hamcrest
之后加载Junit。我有一个intellij项目,我在其中设置了一个外部库,其中包含JUnit、JMock和
hamcrest
。如何确保此错误不会出现
浏览 1
提问于2012-08-22
得票数 3
回答已采纳
2
回答
运行Spring测试时NoSuchMethod错误
java
、
maven
、
spring-mvc
我试图效仿(第4版)第5章中
的
例子来创建我自己
的
项目。(仍然是企业级
的
新手)我正在
使用
Windows 7 PC、Java 7、Spring 4和Maven。当我运行我
的
ClinicalNoteControllerTest时,测试失败,在特定
的
行上有一个NoSuchMethod错误。但我研究过这一行,似乎写得很对。它肯定遵循了书中
的
例子。我想知道我
的
pom.xml文件中是否没有正确
的
配置? 你们总是那么乐于助人,我很感激你们能在这里找到
浏览 8
提问于2015-01-10
得票数 2
回答已采纳
1
回答
Eclipse - Shazamcrest - java.lang.NoSuchFieldError:无
java
、
eclipse
、
junit
、
hamcrest
在从eclipse插件dir中删除
Hamcrest
jar之后,我有了基本
的
hamcrest
调用。据我所知,它
使用
的
是
hamcrest
1.3和JUnit 4,我查看了Run > Run Configuration> myTest > Source >默认值,并从本地maven repo中看到了
hamcrest
它
使用
mvn命令行工作,但在eclipse中不工作。 你知道这是怎么回事吗我怎么解决
的
?item.pu
浏览 3
提问于2014-12-10
得票数 3
1
回答
hamcrest
containsInAnyOrder只适用于特定
的
订单
java
、
collections
、
junit
、
hamcrest
我试图做一个测试,检查一个特定
的
列表是否有项目,而我不在乎订单。 this.propA = propA;}import static org.
hamcrest
.MatcherAssert.assertThat;import static
浏览 2
提问于2014-07-16
得票数 6
回答已采纳
2
回答
使用
android + dagger运行instrumentTests
android
、
android-testing
、
android-gradle-plugin
、
android-espresso
最近,我开始
使用
Android和gradle进行android开发,发现总体上比eclipse/ant或maven好得多。然而,我最近开始尝试用我
的
应用程序实现某种单元和或集成测试。我能够
使用
google最近发布
的
Espresso框架进行基本测试。不过,我有一些测试,需要模拟和注入对象
的
模拟版本。我过去在另一个项目中
使用
匕首,所以我把匕首包括在我
的
项目中。SNAPSHOT.jar', 'libs/testr
浏览 2
提问于2013-10-28
得票数 6
回答已采纳
3
回答
无法解决org.
hamcrest
.Matchers.hasProperty问题
java
、
junit4
、
hamcrest
导入org.
hamcrest
.Matchers.hasProperty无法在JUnit4.12中解析。
使用
hasProperty
的
替代方案是什么?
浏览 3
提问于2018-03-15
得票数 7
回答已采纳
1
回答
用Regex断言RestAssured响应体
java
、
regex
、
junit
、
rest-assured
、
hamcrest
我试图
使用
RestAssured作为集成测试
的
一部分,在json响应体中断言一个时间戳字段。我不确定哪种方法适合执行regex匹配。以下是json
的
回应:"timestamp": "2018-06-05T23:56:09.653+0000","error": "None",} 这是我
的
RestAssured响应断
浏览 0
提问于2018-06-06
得票数 1
回答已采纳
4
回答
找不到
Assert.Fail
和Assert.Pass或
等效
项
.net
、
xunit.net
我曾经在NUnit中
使用
过它们,它们真的很有用。你知道怎么做这样
的
事吗?condition= true;//Assert.Pass() StartObservable(); Assert.True(condition);//
Assert.Fail
浏览 3
提问于2013-02-01
得票数 77
回答已采纳
1
回答
实现Spring控制器
的
单元测试时缺少依赖
项
hasSize()和hasProperty()
java
、
spring
、
unit-testing
、
spring-mvc
、
dependencies
我正在尝试在Spring MVC控制器中实现一个方法
的
单元测试,如下所示:public void testGetProfile() {}那么我错过了什么呢?我当前导入<
浏览 0
提问于2014-07-05
得票数 10
回答已采纳
1
回答
AssertJ到
Hamcrest
等价性(仅用于Spring测试):如何测试集合中
的
每个POJO
项
(带有日期)
junit
、
hamcrest
、
spring-mvc-test
、
assertj
对于Spring Framework应用程序,有关测试: 这三种方法
的
最佳
等效
近似是什么: tuple我在谷歌做了一<e
浏览 0
提问于2018-04-28
得票数 0
回答已采纳
1
回答
JDK9自动模块和“拆分包”依赖
项
java
、
maven
、
java-9
、
hamcrest
、
java-module
我正在将一个java项目转换为
使用
模块。我
的
一个模块依赖于
hamcrest
库,它同时需要jar文件
hamcrest
.core和
hamcrest
.library。这两个jar文件都有org.
hamcrest
包。因此,当我
的
模块想将这两个jars视为自动模块时,它会失败,因为模块路径中
的
两个模块不能有同名
的
包。我搜索了很多,并在堆叠溢出上找到了一些相关
的
东西。如果我不想重建这些依赖关系,我似乎有两个合理
的</em
浏览 0
提问于2018-11-11
得票数 3
回答已采纳
2
回答
模块中发现
的
重复类org.
hamcrest
.BaseDescription -
hamcrest
-core-1.3.jar
android
、
android-espresso
、
hamcrest
mockito-kotlin-kt1.1:1.5.0'android.useAndroidX=true这里我
的
Espressojetified-
hamcrest
-core-1.3.jar (org.
hamcrest
:
hamcrest
-core:1.3) and jetified-java-
hamcrest
-2.0.0.0.jar-1.3.jar (org.
hamcrest
:<e
浏览 10
提问于2019-11-28
得票数 7
1
回答
错误JSON.simple: java.util.zip.ZipException:重复条目: org/
hamcrest
/BaseDescription.class
android
、
gradle
、
build
、
android-gradle-plugin
、
json-simple
java.util.zip.ZipException:重复条目: org/
hamcrest
/BaseDescription.class apply plugincom.googlecode.json-simple:json-simple:1.1.1'改为compile('com.googlecode.json-simple:json-simple:1.1.1'){ exclude group: 'org.
hamcrest
', mo
浏览 3
提问于2015-09-12
得票数 10
回答已采纳
2
回答
JUnit抛出java.lang.NoClassDefFoundError: org/
hamcrest
/MatcherAssert
java
、
maven
、
exception
、
junit
、
hamcrest
我
使用
JUnit 4.11和
Hamcrest
1.1编写测试代码,配置如下: <groupId>junit</groupId> <version>4.11</version></dependency> &
浏览 15
提问于2016-01-29
得票数 2
回答已采纳
15
回答
在IntelliJ 10.5中运行测试时获得"NoSuchMethodError: org.
hamcrest
.Matcher.describeMismatch“
java
、
junit
、
intellij-idea
、
junit4
、
hamcrest
我
使用
的
是JUnit-dep 4.10和
Hamcrest
1.3.RC2。(MyTest.java:40) 我
的
猜测是它
使用
了错误
的
hamcrest
.MatcherAssert。我如何找出它
使用
的
是哪个
hamcrest
.MatcherAssert文件(即它
使用
哪个jar文件用于
hamcrest
.MatcherAssert)?AFAICT,我
的
类路径中唯一
的
浏览 3
提问于2011-10-24
得票数 241
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
WPS表格拒绝录入重复项的使用方法
国源展览:科技馆中互动多媒体的展项使用
六项必须要掌握的防静电实时监控系统的使用原则-POUSTO
使用 Python 打印漂亮的表格,这两项基本功你可会?
Google使用人工智能的七项原则,以及四条底线
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券