1
1
using System . Runtime . InteropServices ;
2
- using FluentAssertions ;
3
2
using Microsoft . VisualStudio . TestTools . UnitTesting ;
4
3
5
4
namespace WCharT . Tests ;
@@ -13,7 +12,7 @@ public void TestEncoding()
13
12
var text = "Test" ;
14
13
var str = new WCharTString ( text ) ;
15
14
16
- str . GetString ( ) . Should ( ) . Be ( text ) ;
15
+ Assert . AreEqual ( str . GetString ( ) , text ) ;
17
16
}
18
17
19
18
[ TestMethod ]
@@ -23,8 +22,9 @@ public void BufferSizeIsRetained()
23
22
var str = new WCharTString ( bufferSize ) ;
24
23
25
24
var result = str . GetString ( ) ;
26
- result . Should ( ) . Be ( new string ( new [ ] { char . MinValue , char . MinValue , char . MinValue } ) ) ;
27
- result . Length . Should ( ) . Be ( bufferSize ) ;
25
+
26
+ Assert . AreEqual ( result , new string ( new [ ] { char . MinValue , char . MinValue , char . MinValue } ) ) ;
27
+ Assert . AreEqual ( result . Length , bufferSize ) ;
28
28
}
29
29
30
30
[ TestMethod ]
@@ -47,7 +47,7 @@ public void TestUnicode()
47
47
fixed ( byte * p = data )
48
48
{
49
49
var str = new WCharTString ( p ) ;
50
- str . GetString ( ) . Should ( ) . Be ( new string ( new [ ] { '\u0100 ' , '\u0100 ' } ) ) ;
50
+ Assert . AreEqual ( str . GetString ( ) , new string ( new [ ] { '\u0100 ' , '\u0100 ' } ) ) ;
51
51
}
52
52
}
53
53
#pragma warning restore CA1861
@@ -79,7 +79,7 @@ public void TestUtf32()
79
79
fixed ( byte * p = data )
80
80
{
81
81
var str = new WCharTString ( p ) ;
82
- str . GetString ( ) . Should ( ) . Be ( new string ( new [ ] { '\u0100 ' , '\u0100 ' } ) ) ;
82
+ Assert . AreEqual ( str . GetString ( ) , new string ( new [ ] { '\u0100 ' , '\u0100 ' } ) ) ;
83
83
}
84
84
}
85
85
#pragma warning restore CA1861
0 commit comments