mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
Added Tests for Util class and some cleanup
This commit is contained in:
parent
cdceb6a57a
commit
a24b667eb9
@ -56,8 +56,9 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ProxyConfigTest.cs" />
|
<Compile Include="ProxyConfigTest.cs" />
|
||||||
<Compile Include="SpotifyUriTest.cs" />
|
<Compile Include="SpotifyUriTest.cs" />
|
||||||
<Compile Include="TestClass.cs" />
|
<Compile Include="SpotifyWebAPITest.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="UtilTest.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\SpotifyAPI\SpotifyAPI.csproj">
|
<ProjectReference Include="..\SpotifyAPI\SpotifyAPI.csproj">
|
||||||
|
@ -1,16 +1,11 @@
|
|||||||
using Moq;
|
using NUnit.Framework;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using SpotifyAPI.Local;
|
|
||||||
using SpotifyAPI.Local.Models;
|
using SpotifyAPI.Local.Models;
|
||||||
using SpotifyAPI.Local.Enums;
|
using SpotifyAPI.Local.Enums;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace SpotifyAPI.Tests
|
namespace SpotifyAPI.Tests
|
||||||
{
|
{
|
||||||
|
[TestFixture]
|
||||||
public class SpotifyUriTest
|
public class SpotifyUriTest
|
||||||
{
|
{
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -11,7 +11,7 @@ using System.Linq;
|
|||||||
namespace SpotifyAPI.Tests
|
namespace SpotifyAPI.Tests
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestClass
|
public class SpotifyWebAPITest
|
||||||
{
|
{
|
||||||
private static readonly string FixtureDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "../../fixtures/");
|
private static readonly string FixtureDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "../../fixtures/");
|
||||||
|
|
19
SpotifyAPI.Tests/UtilTest.cs
Normal file
19
SpotifyAPI.Tests/UtilTest.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using SpotifyAPI.Web;
|
||||||
|
|
||||||
|
namespace SpotifyAPI.Tests
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class UtilTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void TimestampShouldBeNoFloatingPoint()
|
||||||
|
{
|
||||||
|
string timestamp = DateTime.Now.ToUnixTimeMillisecondsPoly().ToString();
|
||||||
|
|
||||||
|
StringAssert.DoesNotContain(".", timestamp);
|
||||||
|
StringAssert.DoesNotContain(",", timestamp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user