我正在使用XUnit框架编写一些测试,并且必须使用通过dll引用的一些外部代码.
当我尝试进入方法调用helper.GetEntity()时,我得到以下窗口并且执行存在.
[Fact]
public void PassingTest()
{
var datapointJson = File.ReadAllText(@"sample.json");
dynamic datapointObject = JsonConvert.DeserializeObject(datapointJson);
// This is referenced from a different project in the same solution.
var helper = new Helper.Actions();
var studentEntity = helper.GetEntity("tom");
}
Run Code Online (Sandbox Code Playgroud)
有谁知道为什么会这样?
问候.
(发布@ camilo-terevinto的评论作为答案)
在Visual Studio中打开"启用我的代码" 工具| 调试| 一般.