断言方法错误 [英] Assert Method Error

查看:87
本文介绍了断言方法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在代码中使用行Assert.IsNotNull(object);.我不断收到错误消息:

I am using the line Assert.IsNotNull(object); in my code. I keep getting the error:

断言名称在当前内容中不存在

the name assert does not exist in the current content

有人可以告诉我我想念什么吗?

Can someone please tell me what I'm missing?

推荐答案

您需要在项目引用中添加Microsoft.VisualStudio.QualityTools.UnitTestFramework并添加

You need to add Microsoft.VisualStudio.QualityTools.UnitTestFramework to your project references and add

using Microsoft.VisualStudio.TestTools.UnitTesting;

这篇关于断言方法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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