mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
0391371a8c
* Bump NUnit from 3.13.3 to 4.0.0 Bumps [NUnit](https://github.com/nunit/nunit) from 3.13.3 to 4.0.0. - [Release notes](https://github.com/nunit/nunit/releases) - [Changelog](https://github.com/nunit/nunit/blob/master/CHANGES.md) - [Commits](https://github.com/nunit/nunit/compare/v3.13.3...v4.0.0) --- updated-dependencies: - dependency-name: NUnit dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * update tests to nunit 4.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jonas Dellinger <jonas@dellinger.dev>
34 lines
797 B
C#
34 lines
797 B
C#
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.That(expected, Is.EqualTo(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.That(expected, Is.EqualTo(func($"/users/{user}")));
|
|
}
|
|
}
|
|
}
|