想要单元测试返回类型为responsemessage的方法 [英] want to unit test a method which return type is responsemessage

查看:311
本文介绍了想要单元测试返回类型为responsemessage的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想单元测试一个返回类型是响应result.im面向问题的方法,我将使用assert.areequal()方法,我的单元测试将会成功。

解决方案

请详细说明您的问题。如果你提供代码,我会更好。我猜你在Assert.areequal()中遇到了问题。你在检查对象或值吗?如果您检查对象,那么您将无法获得预期值。

请提供您的代码。感谢。

Hi I want to unit test a method which return type is response result.i m facing problem which assert.areequal() method i will use for which my unit test will be succeded.

解决方案

Please give details of your question. I will better if you give your code. I guess you are facing problem in Assert.areequal(). Are you checking the object or value. If you check your object then you will not get your expected value.
Please provide your code. Thanks.


这篇关于想要单元测试返回类型为responsemessage的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆