Spotify.NET/SpotifyAPI.Web.Tests/UtilTests/URIParameterFormatProviderTest.cs
dependabot[bot] 0391371a8c
Bump NUnit from 3.13.3 to 4.0.0 (#922)
* 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>
2024-02-10 11:41:47 +01:00

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}")));
}
}
}