11using System . Collections ;
22using System . Data ;
33using System . Text . RegularExpressions ;
4- using TUnit . Assertions . AssertConditions ;
5- using TUnit . Assertions . AssertConditions . Throws ;
6- using TUnit . Assertions . Enums ;
4+ using TUnit . Assertions . Extensions ;
75
86namespace TUnitTests ;
97
@@ -14,7 +12,6 @@ public async Task Test1()
1412 {
1513 bool ? actual = true ;
1614 await Assert . That ( actual ) . IsTrue ( ) ;
17- await Assert . That ( actual ) . IsNotFalse ( ) ;
1815 await Assert . That ( actual ) . IsNotNull ( ) ;
1916
2017 actual = null ;
@@ -62,14 +59,14 @@ public async Task ExceptionsDerived()
6259
6360 Func < Task > asyncSut = ( ) => throw new ArgumentException ( "cause" ) ;
6461 var ex2 = await Assert . ThrowsAsync < Exception > ( asyncSut ) ;
65- await Assert . That ( ex2 . Message ) . IsEqualTo ( "cause" ) ;
62+ await Assert . That ( ex2 ! . Message ) . IsEqualTo ( "cause" ) ;
6663 }
6764
6865 [ Test ]
6966 public async Task Types ( )
7067 {
7168 ICollection collection = new ArrayList ( ) ;
72- await Assert . That ( collection ) . IsAssignableFrom ( typeof ( ArrayList ) ) ;
69+ await Assert . That ( collection ) . IsAssignableFrom < ArrayList > ( ) ;
7370 await Assert . That ( collection ) . IsTypeOf < ArrayList > ( ) ;
7471 }
7572
@@ -81,8 +78,7 @@ public async Task Collections()
8178
8279 await Assert . That ( actual ) . IsNotEmpty ( ) ;
8380 await Assert . That ( actual ) . IsEquivalentTo ( new [ ] { 3 , 2 , 1 } ) ;
84- await Assert . That ( actual ) . IsNotEquivalentTo ( expected ) ;
85- await Assert . That ( actual ) . IsEquivalentTo ( expected , CollectionOrdering . Any ) ;
81+ await Assert . That ( actual ) . IsEquivalentTo ( expected ) ; // ignores order by default
8682
8783 await Assert . That ( actual ) . Contains ( 2 ) ;
8884 await Assert . That ( actual ) . DoesNotContain ( 5 ) ;
@@ -104,7 +100,6 @@ public async Task Numbers()
104100 await Assert . That ( actual ) . IsGreaterThan ( 0 ) ;
105101 await Assert . That ( actual ) . IsLessThanOrEqualTo ( 100 ) ;
106102 await Assert . That ( actual ) . IsPositive ( ) ;
107- await Assert . That ( actual ) . IsNotNegative ( ) ;
108103 await Assert . That ( actual ) . IsNotZero ( ) ;
109104 }
110105
0 commit comments