File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
WebApiClient.Test/Internal Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Text ;
4+ using Xunit ;
5+
6+ namespace WebApiClient . Test . Internal
7+ {
8+ public class Guid16Test
9+ {
10+ [ Fact ]
11+ public void ToInt64Test ( )
12+ {
13+ var guid16 = new Guid16 ( 5 ) ;
14+ Assert . Equal ( 5L , guid16 . ToInt64 ( ) ) ;
15+ }
16+
17+ [ Fact ]
18+ public void EmptyTest ( )
19+ {
20+ Assert . True ( Guid16 . Empty . ToInt64 ( ) == new Guid16 ( ) . ToInt64 ( ) ) ;
21+ }
22+
23+ [ Fact ]
24+ public void ParseTest ( )
25+ {
26+ var guid16 = new Guid16 ( 5L ) ;
27+ var g = Guid16 . Parse ( guid16 . ToString ( ) ) ;
28+ Assert . Equal ( guid16 , g ) ;
29+ }
30+
31+ [ Fact ]
32+ public void EqualTest ( )
33+ {
34+ var g = new Guid16 ( 5L ) ;
35+ var g1 = new Guid16 ( 5L ) ;
36+ object g2 = new Guid16 ( 5L ) ;
37+
38+ Assert . True ( g . Equals ( g2 ) ) ;
39+ Assert . True ( g . Equals ( g2 ) ) ;
40+ }
41+
42+ [ Fact ]
43+ public void CompareToTest ( )
44+ {
45+ var g = new Guid16 ( 5L ) ;
46+ var g1 = new Guid16 ( 5L ) ;
47+ Assert . True ( g . CompareTo ( g1 ) == 0 ) ;
48+ }
49+
50+ [ Fact ]
51+ public void ToStringTest ( )
52+ {
53+ var g = new Guid16 ( 5L ) ;
54+ Assert . Equal ( g . ToString ( ) , "5" . PadLeft ( 16 , '0' ) ) ;
55+ }
56+ }
57+ }
You can’t perform that action at this time.
0 commit comments