mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-27 00:16:26 +00:00
9f6729ad60
Disabled examples for now
35 lines
815 B
C#
35 lines
815 B
C#
using System.Collections.Generic;
|
|
using System;
|
|
using NUnit.Framework;
|
|
|
|
namespace SpotifyAPI.Web.Tests
|
|
{
|
|
[TestFixture]
|
|
public class URIParameterFormatProviderTest
|
|
{
|
|
[Test]
|
|
public void Format_NormalParameters()
|
|
{
|
|
var expected = "/users/wizzler";
|
|
|
|
var user = "wizzler";
|
|
var formatter = new URIParameterFormatProvider();
|
|
string func(FormattableString str) => str.ToString(formatter);
|
|
|
|
Assert.AreEqual(expected, func($"/users/{user}"));
|
|
}
|
|
|
|
[Test]
|
|
public void Format_EscapedParameters()
|
|
{
|
|
var expected = "/users/++wizzler";
|
|
|
|
var user = " wizzler";
|
|
var formatter = new URIParameterFormatProvider();
|
|
string func(FormattableString str) => str.ToString(formatter);
|
|
|
|
Assert.AreEqual(expected, func($"/users/{user}"));
|
|
}
|
|
}
|
|
}
|