Assert.AreEqual( double, double, double );
Assert.Fail();
使用这个类的示例如下:
namespace UnitTestingExamples
{
using System;
using NUnit.Framework;
[TestFixture]
public class SomeTests
{
[Test]
public void TestEventLengthString()
{
// Should return true
bool bResult1 = Class1.CheckPalindrome("ABCCBA");
Assert.IsTrue(bResult1);
// Should return false
bool bResult2 = Class1.CheckPalindrome("ABCDBA");
Assert.IsFalse(bResult2);
}
[Test]
public void TestOddLengthString()
{
//should return true;
文章来源于领测软件测试网 https://www.ltesting.net/