logo
  • 教程列表
  • SO官方文檔
  • 屬性
    • TestCaseAttributeExample
    • TestFixture
    • TestFixtureSetUp
    • 拆除
    • ValuesAttribute
  1. StackOverflow 文件
  2. nunit 教程
  3. 屬性
  4. TestCaseAttributeExample

TestCaseAttributeExample

Created: November-22, 2018

[TestCase(0, 0, 0)]
[TestCase(34, 25, 59)]
[TestCase(-1250, 10000, 8750)]
public void AddNumbersTest(int a, int b, int expected)
{
    // Act
    int result = a + b;
            
    // Assert
    Assert.That(result, Is.EqualTo(expected));
}
  • TestFixture
  • 屬性

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明