?????????????????????????????????????????????????????????????????????в????????????????????????????????????????????У????Assert?????????ж????????????????????????????????????????????????????????????????????????????????????????????????ж??????????????????????????????????????????????????????????????????????????????excel????洢????????????????

??????????????μ???????н????????н2000?????????????10???????????????????1000?????????0.05??????????1000??????2000?????????0.10??????2000???????0.15???????????????????????????????????????????????£?

namespace CalculateSalaryProject
{
    public class Program
    {
        public double GetTotalSalaryBySales(int sales)
        {
            const double BaseSalary = 2000;
            double unitPrice = 10;
            double royaltyRate = 0.0;

            if (sales <= 0)
            {
                royaltyRate = 0.0;
            }
            else if (sales <= 1000)
            {
                royaltyRate = 0.05;
            }
            else if (sales <= 2000)
            {
                royaltyRate = 0.10;
            }
            else
            {
                royaltyRate = 0.15;
            }

            return BaseSalary + unitPrice * sales * royaltyRate;
        }
    } }

????????????????????????е?????????£?

using CalculateSalaryProject;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace TestProject
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void GetSalaryBySalesUnitTest()
        {
            Program program = new Program();
            double actualSalary = program.GetTotalSalaryBySales(1);
            double expectedSalary = 2000.5;
            Assert.AreEqual(expectedSalary?? actualSalary);
        }
    }
}

?????ò???????????????1???????????????????????????????????????????-1??0??1??999??1000??1001??1999??2000??2001??????????????????????????????Щ?????