Skip to content

Commit

Permalink
Added Tests for Util class and some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyCrazy committed Apr 1, 2018
1 parent cdceb6a commit a24b667
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
3 changes: 2 additions & 1 deletion SpotifyAPI.Tests/SpotifyAPI.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
9 changes: 2 additions & 7 deletions SpotifyAPI.Tests/SpotifyUriTest.cs
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace SpotifyAPI.Tests
{
[TestFixture]
public class TestClass
public class SpotifyWebAPITest
{
private static readonly string FixtureDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "../../fixtures/");

Expand Down
19 changes: 19 additions & 0 deletions SpotifyAPI.Tests/UtilTest.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
}

0 comments on commit a24b667

Please sign in to comment.