Tweaked Test and some Lib modifications

This commit is contained in:
Johnny @PC 2016-03-05 16:24:54 +01:00
parent 8afd134769
commit 4fe00c0f0e
3 changed files with 15 additions and 13 deletions

View File

@ -32,15 +32,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.2.1506.2515\lib\net40\Moq.dll</HintPath>
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.0.5797.27534, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.0.0\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@ -28,7 +28,7 @@ namespace SpotifyAPI.Tests
private static T GetFixture<T>(string file)
{
return JsonConvert.DeserializeObject<T>(File.ReadAllText(Path.Combine("../../fixtures/", file)));
return JsonConvert.DeserializeObject<T>(File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory + "../../../fixtures/", file)));
}
private static bool ContainsValues(string str, params string[] values)
@ -37,11 +37,11 @@ namespace SpotifyAPI.Tests
}
[Test]
[ExpectedException(typeof(InvalidOperationException))]
public void ShouldGetPrivateProfile_WithoutAuth()
{
_spotify.UseAuth = false;
_spotify.GetPrivateProfile();
Assert.Throws<InvalidOperationException>(() => _spotify.GetPrivateProfile());
}
[Test]

View File

@ -2,5 +2,5 @@
<packages>
<package id="Moq" version="4.2.1510.2205" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net45" />
<package id="NUnit" version="3.0.1" targetFramework="net45" />
<package id="NUnit" version="3.0.0" targetFramework="net45" />
</packages>