File tree 2 files changed +6
-2
lines changed
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()
50
50
public void ShouldGetPrivateProfile_WithAuth ( )
51
51
{
52
52
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 ) ) ;
54
55
55
56
_spotify . UseAuth = true ;
56
57
Assert . AreEqual ( profile , _spotify . GetPrivateProfile ( ) ) ;
@@ -61,7 +62,8 @@ public void ShouldGetPrivateProfile_WithAuth()
61
62
public void ShouldGetPublicProfile ( )
62
63
{
63
64
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 ) ) ;
65
67
66
68
Assert . AreEqual ( profile , _spotify . GetPublicProfile ( "wizzler" ) ) ;
67
69
_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
5
5
public class ResponseInfo
6
6
{
7
7
public WebHeaderCollection Headers { get ; set ; }
8
+
9
+ public static readonly ResponseInfo Empty = new ResponseInfo ( ) ;
8
10
}
9
11
}
You can’t perform that action at this time.
0 commit comments