File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ public void ShouldGetPrivateProfile_WithoutAuth()
5050 public void ShouldGetPrivateProfile_WithAuth ( )
5151 {
5252 PrivateProfile profile = GetFixture < PrivateProfile > ( "private-user.json" ) ;
53- _mock . Setup ( client => client . DownloadJson < PrivateProfile > ( It . IsAny < string > ( ) ) ) . Returns ( new Tuple < ResponseInfo , PrivateProfile > ( null , profile ) ) ;
53+ _mock . Setup ( client => client . DownloadJson < PrivateProfile > ( It . IsAny < string > ( ) ) )
54+ . Returns ( new Tuple < ResponseInfo , PrivateProfile > ( ResponseInfo . Empty , profile ) ) ;
5455
5556 _spotify . UseAuth = true ;
5657 Assert . AreEqual ( profile , _spotify . GetPrivateProfile ( ) ) ;
@@ -61,7 +62,8 @@ public void ShouldGetPrivateProfile_WithAuth()
6162 public void ShouldGetPublicProfile ( )
6263 {
6364 PublicProfile profile = GetFixture < PublicProfile > ( "public-user.json" ) ;
64- _mock . Setup ( client => client . DownloadJson < PublicProfile > ( It . IsAny < string > ( ) ) ) . Returns ( new Tuple < ResponseInfo , PublicProfile > ( null , profile ) ) ;
65+ _mock . Setup ( client => client . DownloadJson < PublicProfile > ( It . IsAny < string > ( ) ) )
66+ . Returns ( new Tuple < ResponseInfo , PublicProfile > ( ResponseInfo . Empty , profile ) ) ;
6567
6668 Assert . AreEqual ( profile , _spotify . GetPublicProfile ( "wizzler" ) ) ;
6769 _mock . Verify ( client => client . DownloadJson < PublicProfile > ( It . Is < string > ( str => ContainsValues ( str , "/users/wizzler" ) ) ) , Times . Exactly ( 1 ) ) ;
Original file line number Diff line number Diff line change @@ -5,5 +5,7 @@ namespace SpotifyAPI.Web.Models
55 public class ResponseInfo
66 {
77 public WebHeaderCollection Headers { get ; set ; }
8+
9+ public static readonly ResponseInfo Empty = new ResponseInfo ( ) ;
810 }
911}
You can’t perform that action at this time.
0 commit comments