Spotify.NET/SpotifyAPI.Web.Tests/UtilTests/URIParameterFormatProviderTest.cs
Jonas Dellinger cb2e0cccc8 run formatter
2022-11-27 13:29:35 +01:00

35 lines
815 B
C#

using System;
using System.Collections.Generic;
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}"));
}
}
}