public void ShouldThrowExceptionWhenCallingConvertObjectToCanonicalStringForInvalidType() { // Arrange + Act + Assert Action action = () => SpotifyObjectUtils.ConvertToCanonicalString(new object()); action.Should().Throw <InvalidOperationException>(); }
private FormUrlEncodedContent GetFormUrlEncodedContent(IEnumerable <KeyValuePair <string, object> > formParams) => new FormUrlEncodedContent(formParams.Select(kvp => new KeyValuePair <string, string>(kvp.Key, SpotifyObjectUtils.ConvertToCanonicalString(kvp.Value))));
public void ShouldConvertObjectToCanonicalString(object value, string expected) { // Arrange + Act + Assert SpotifyObjectUtils.ConvertToCanonicalString(value).Should().Be(expected); }