gpt4 book ai didi

unit-testing - 命名只调用构造函数的单元测试?

转载 作者:行者123 更新时间:2023-12-04 16:28:10 24 4
gpt4 key购买 nike

我正在尝试关注 Roy Osherove's UnitTests naming convention ,使用命名模板:[MethodName_StateUnderTest_ExpectedBehavior]。

按照这个模式。你如何命名一个调用构造函数的测试?

[Test]
public void ????()
{
var product = new Product();
Assert.That(product, Is.Not.Null);
}

最佳答案

Constructor_WithoutArguments_Succeeds

关于unit-testing - 命名只调用构造函数的单元测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2840876/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com