A-A+

【NUnit】Comparisons (NUnit 2.2.4)

2014年12月27日 Nunit 【NUnit】Comparisons (NUnit 2.2.4)已关闭评论 阅读 324 次

以下方法测试了一个对象是否大于另一个对象。与Asserts顺序序相反,这些方法是英文字母顺序或者数学顺序。因此Assert.Greater( x, y )意思是X>y。

Assert.Greater( int arg1, int arg2 );
Assert.Greater( int arg1, int arg2, string message );
Assert.Greater( int arg1, int arg2, string message, object[] parms );

Assert.Greater( uint arg1, uint arg2 );
Assert.Greater( uint arg1, uint arg2, string message );
Assert.Greater( uint arg1, uint arg2, string message, object[] parms );

Assert.Greater( long arg1, long arg2 );
Assert.Greater( long arg1, long arg2, string message );
Assert.Greater( long arg1, long arg2, string message, object[] parms );

Assert.Greater( ulong arg1, ulong arg2 );
Assert.Greater( ulong arg1, ulong arg2, string message );
Assert.Greater( ulong arg1, ulong arg2, string message, object[] parms );

Assert.Greater( decimal arg1, decimal arg2 );
Assert.Greater( decimal arg1, decimal arg2, string message );
Assert.Greater( decimal arg1, decimal arg2, string message, object[] parms );

Assert.Greater( double arg1, double arg2 );
Assert.Greater( double arg1, double arg2, string message );
Assert.Greater( double arg1, double arg2, string message, 
                object[] parms );

Assert.Greater( double arg1, double arg2 );
Assert.Greater( double arg1, double arg2, string message );
Assert.Greater( double arg1, double arg2, string message,  object[] parms );

Assert.Greater( float arg1, float arg2 );
Assert.Greater( float arg1, float arg2, string message );
Assert.Greater( float arg1, float arg2, string message, 
                object[] parms );

Assert.Greater( IComparable arg1, IComparable arg2 );
Assert.Greater( IComparable arg1, IComparable arg2, string message );
Assert.Greater( IComparable arg1, IComparable arg2, string message,object[] parms );

 

接下来的方法测试了一个对象是否大于或者等于另一个对象。与Asserts正序相反,这些方法是英文字母顺序或者数学顺序。Assert.GreaterOrEqual( x, y ) 意思是x>=y

Assert.GreaterOrEqual( int arg1, int arg2 );
Assert.GreaterOrEqual( int arg1, int arg2, string message );
Assert.GreaterOrEqual( int arg1, int arg2, string message, object[] parms );

Assert.GreaterOrEqual( uint arg1, uint arg2 );
Assert.GreaterOrEqual( uint arg1, uint arg2, string message );
Assert.GreaterOrEqual( uint arg1, uint arg2, string message, object[] parms );

Assert.GreaterOrEqual( long arg1, long arg2 );
Assert.GreaterOrEqual( long arg1, long arg2, string message );
Assert.GreaterOrEqual( long arg1, long arg2, string message, object[] parms );

Assert.GreaterOrEqual( ulong arg1, ulong arg2 );
Assert.GreaterOrEqual( ulong arg1, ulong arg2, string message );
Assert.GreaterOrEqual( ulong arg1, ulong arg2, string message, object[] parms );

Assert.GreaterOrEqual( decimal arg1, decimal arg2 );
Assert.GreaterOrEqual( decimal arg1, decimal arg2, string message );
Assert.GreaterOrEqual( decimal arg1, decimal arg2, string message, object[] parms );

Assert.GreaterOrEqual( double arg1, double arg2 );
Assert.GreaterOrEqual( double arg1, double arg2, string message );
Assert.GreaterOrEqual( double arg1, double arg2, string message, object[] parms );

Assert.GreaterOrEqual( double arg1, double arg2 );
Assert.GreaterOrEqual( double arg1, double arg2, string message );
Assert.GreaterOrEqual( double arg1, double arg2, string message, object[] parms );

Assert.GreaterOrEqual( float arg1, float arg2 );
Assert.GreaterOrEqual( float arg1, float arg2, string message );
Assert.GreaterOrEqual( float arg1, float arg2, string message, object[] parms );

Assert.GreaterOrEqual( IComparable arg1, IComparable arg2 );
Assert.GreaterOrEqual( IComparable arg1, IComparable arg2, string message );
Assert.GreaterOrEqual( IComparable arg1, IComparable arg2, string message, 
                object[] parms );

接下来的方法测试了一个对象是否小于另一个对象。与Asserts正序相反,这些方法是英文字母顺序或者数学顺序。Assert.Less( x, y ) 意思是x<y

Assert.Less( int arg1, int arg2 );
Assert.Less( int arg1, int arg2, string message );
Assert.Less( int arg1, int arg2, string message, object[] parms );
                
Assert.Less( uint arg1, uint arg2 );
Assert.Less( uint arg1, uint arg2, string message );
Assert.Less( uint arg1, uint arg2, string message, object[] parms );
                
Assert.Less( long arg1, long arg2 );
Assert.Less( long arg1, long arg2, string message );
Assert.Less( long arg1, long arg2, string message, object[] parms );

Assert.Less( ulong arg1, ulong arg2 );
Assert.Less( ulong arg1, ulong arg2, string message );
Assert.Less( ulong arg1, ulong arg2, string message, object[] parms );

Assert.Less( decimal arg1, decimal arg2 );
Assert.Less( decimal arg1, decimal arg2, string message );
Assert.Less( decimal arg1, decimal arg2, string message, object[] parms );
                
Assert.Less( double arg1, double arg2 );
Assert.Less( double arg1, double arg2, string message );
Assert.Less( double arg1, double arg2, string message, object[] parms );
                
Assert.Less( float arg1, float arg2 );
Assert.Less( float arg1, float arg2, string message );
Assert.Less( float arg1, float arg2, string message, object[] parms );
                
Assert.Less( IComparable arg1, IComparable arg2 );
Assert.Less( IComparable arg1, IComparable arg2, string message );
Assert.Less( IComparable arg1, IComparable arg2, string message, object[] parms );

接下来的方法测试了一个对象是否小于或者等于另一个对象。与Asserts正序相反,这些方法是英文字母顺序或者数学顺序。Assert.LessOrEqual 意思是x<=y

Assert.LessOrEqual(int arg1,int arg2 );
Assert.LessOrEqual(int arg1,int arg2,string message );
Assert.LessOrEqual(int arg1,int arg2,string message,object[] parms );
Assert.LessOrEqual(uint arg1,uint arg2 );
Assert.LessOrEqual(uint arg1,uint arg2,string message );
Assert.LessOrEqual(uint arg1,uint arg2,string message,object[] parms );
Assert.LessOrEqual(long arg1,long arg2 );
Assert.LessOrEqual(long arg1,long arg2,string message );
Assert.LessOrEqual(long arg1,long arg2,string message,object[] parms );
Assert.LessOrEqual(ulong arg1,ulong arg2 );
Assert.LessOrEqual(ulong arg1,ulong arg2,string message );
Assert.LessOrEqual(ulong arg1,ulong arg2,string message,object[] parms );
Assert.LessOrEqual(decimal arg1,decimal arg2 );
Assert.LessOrEqual(decimal arg1,decimal arg2,string message );
Assert.LessOrEqual(decimal arg1,decimal arg2,string message,object[] parms );
Assert.LessOrEqual(double arg1,double arg2 );
Assert.LessOrEqual(double arg1,double arg2,string message );
Assert.LessOrEqual(double arg1,double arg2,string message,object[] parms );
Assert.LessOrEqual(float arg1,float arg2 );
Assert.LessOrEqual(float arg1,float arg2,string message );
Assert.LessOrEqual(float arg1,float arg2,string message,object[] parms );
Assert.LessOrEqual( IComparable arg1, IComparable arg2 );
Assert.LessOrEqual( IComparable arg1, IComparable arg2,string message );
Assert.LessOrEqual( IComparable arg1, IComparable arg2,string message,object[] parms );
标签:

评论已关闭!

Copyright © 极品飞鸽 保留所有权利.   Theme  Ality 蜀ICP备14015766号-1

用户登录

分享到: