使用NUnit和 XML注释编写C#代码时,是否需要首选格式? 将: using NUnit.Framework;namespace FooBar{ /// summary /// The cfoo/c class tests bar /// /summary [TestFixture] public class Foo{ }} 是正确的还是: using NUni
将:
using NUnit.Framework;
namespace FooBar{
/// <summary>
/// The <c>foo</c> class tests bar
/// </summary>
[TestFixture]
public class Foo{
}
}
是正确的还是:
using NUnit.Framework;
namespace FooBar{
[TestFixture]
/// <summary>
/// The <c>foo</c> class tests bar
/// </summary>
public class Foo{
}
}
会更好?
这不是NUnit特有的 – 它是任何属性.这是一个偏好问题,但至少对我来说,评论应该在代码之前 – 属性也算作代码.
