File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ public void InvalidUidForUserRecord()
3535 Assert . Throws < ArgumentException > ( ( ) => new UserRecord ( ( string ) null ) ) ;
3636 Assert . Throws < ArgumentException > ( ( ) => new UserRecord ( ( GetAccountInfoResponse . User ) null ) ) ;
3737 Assert . Throws < ArgumentException > ( ( ) => new UserRecord ( string . Empty ) ) ;
38- Assert . Throws < ArgumentException > ( ( ) => new UserRecord ( new string ( 'a' , 129 ) ) ) ;
38+
39+ // The constructor for UserRecord should not throw an exception when initialized with a valid string.
40+ var userRecord = new UserRecord ( new string ( 'a' , 129 ) ) ;
3941 }
4042
4143 [ Fact ]
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ internal UserRecord(string uid)
4949 {
5050 if ( string . IsNullOrEmpty ( uid ) )
5151 {
52- throw new ArgumentNullException ( nameof ( uid ) ) ;
52+ throw new ArgumentException ( "UserID must not be null or empty." ) ;
5353 }
5454
5555 this . uid = uid ;
@@ -63,7 +63,7 @@ internal UserRecord(GetAccountInfoResponse.User user)
6363 {
6464 if ( user == null )
6565 {
66- throw new ArgumentNullException ( nameof ( user ) ) ;
66+ throw new ArgumentException ( "User object must not be null or empty." ) ;
6767 }
6868 else if ( string . IsNullOrEmpty ( user . UserID ) )
6969 {
You can’t perform that action at this time.
0 commit comments