c#单元测试

using Microsoft.VisualStudio.TestTools.UnitTesting;
using _5118Enterprise.Api.Helper;
using System;
using System.Collections.Generic;
using System.Text;
using Xunit.Sdk;
using Xunit;

namespace _5118Enterprise.Api.Helper.Tests
{
   
    [TestClass()]
    public class ApiHelperTests
    {
        [TestMethod()]
        [DataRow(1,2,3)]
        public void ReplaceNotInLableNameTest(int a,int b ,int result)
        {


            Assert.AreEqual(result,a+b);
        }
    }
}

可以设置多个参数,DataRow支持设置多个

交流扣扣:1328542512
原文地址:https://www.cnblogs.com/codeDevotee/p/14366576.html