Assert.IsFalse( bool );
Assert.IsNull( bool );
Assert.IsNotNull( bool );
Assert.AreSame( object, object )
Assert.AreEqual( object, object );
Assert.AreEqual( int, int );
Assert.AreEqual( float, float, float );
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
文章來源于領測軟件測試網 http://www.kjueaiud.com/