public void CopiesDataFromProfileTest() { var profile = Model.Create <Profile>(); var sut = new PublicProfile(profile); sut.Should().BeEquivalentTo(profile, opt => opt.ExcludingMissingMembers()); }
public void ShouldGetPublicProfile() { PublicProfile profile = GetFixture <PublicProfile>("public-user.json"); _mock.Setup(client => client.DownloadJson <PublicProfile>(It.IsAny <string>(), It.IsAny <Dictionary <string, string> >())) .Returns(new Tuple <ResponseInfo, PublicProfile>(ResponseInfo.Empty, profile)); _spotify.UseAuth = false; profile.Should().Be(_spotify.GetPublicProfile("wizzler")); _mock.Verify(client => client.DownloadJson <PublicProfile>( It.Is <string>(str => ContainsValues(str, "/users/wizzler")), It.Is <Dictionary <string, string> >(headers => headers.Count == 0)), Times.Exactly(1)); }