mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-23 22:56:25 +00:00
Added Tests for Util class and some cleanup
This commit is contained in:
parent
cdceb6a57a
commit
a24b667eb9
@ -56,8 +56,9 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="ProxyConfigTest.cs" />
|
||||
<Compile Include="SpotifyUriTest.cs" />
|
||||
<Compile Include="TestClass.cs" />
|
||||
<Compile Include="SpotifyWebAPITest.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="UtilTest.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SpotifyAPI\SpotifyAPI.csproj">
|
||||
|
@ -1,16 +1,11 @@
|
||||
using Moq;
|
||||
using Newtonsoft.Json;
|
||||
using NUnit.Framework;
|
||||
using SpotifyAPI.Local;
|
||||
using NUnit.Framework;
|
||||
using SpotifyAPI.Local.Models;
|
||||
using SpotifyAPI.Local.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace SpotifyAPI.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class SpotifyUriTest
|
||||
{
|
||||
[Test]
|
||||
|
@ -11,7 +11,7 @@ using System.Linq;
|
||||
namespace SpotifyAPI.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestClass
|
||||
public class SpotifyWebAPITest
|
||||
{
|
||||
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