disposable base for tests; classes for other tests
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
using PocketSharp.Models;
|
||||
|
||||
namespace PocketSharp.Tests
|
||||
{
|
||||
class AddTests : TestsBase
|
||||
{
|
||||
public AddTests() : base() { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
using PocketSharp.Models;
|
||||
|
||||
namespace PocketSharp.Tests
|
||||
{
|
||||
class AuthenticationTests : TestsBase
|
||||
{
|
||||
public AuthenticationTests() : base() { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
using PocketSharp.Models;
|
||||
|
||||
namespace PocketSharp.Tests
|
||||
{
|
||||
class ModifyTagsTests : TestsBase
|
||||
{
|
||||
public ModifyTagsTests() : base() { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
using PocketSharp.Models;
|
||||
|
||||
namespace PocketSharp.Tests
|
||||
{
|
||||
class ModifyTests : TestsBase
|
||||
{
|
||||
public ModifyTests() : base() { }
|
||||
}
|
||||
}
|
||||
@@ -66,8 +66,13 @@
|
||||
<Otherwise />
|
||||
</Choose>
|
||||
<ItemGroup>
|
||||
<Compile Include="AddTests.cs" />
|
||||
<Compile Include="AuthenticationTests.cs" />
|
||||
<Compile Include="ModifyTagsTests.cs" />
|
||||
<Compile Include="ModifyTests.cs" />
|
||||
<Compile Include="RetrieveTests.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TestsBase.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PocketSharp\PocketSharp.csproj">
|
||||
|
||||
@@ -2,28 +2,14 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
using PocketSharp;
|
||||
using PocketSharp.Models;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace PocketSharp.Tests
|
||||
{
|
||||
|
||||
public class RetrieveTests : IDisposable
|
||||
public class RetrieveTests : TestsBase
|
||||
{
|
||||
private PocketClient client;
|
||||
|
||||
|
||||
// setup
|
||||
public RetrieveTests()
|
||||
{
|
||||
// !! please don't misuse this account !!
|
||||
client = new PocketClient(
|
||||
consumerKey: "15396-f6f92101d72c8e270a6c9bb3",
|
||||
callbackUri: "http://frontendplay.com",
|
||||
accessCode: "2c62cd50-b78a-5558-918b-65adae"
|
||||
);
|
||||
}
|
||||
public RetrieveTests() : base() {}
|
||||
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
using PocketSharp.Models;
|
||||
|
||||
namespace PocketSharp.Tests
|
||||
{
|
||||
public class TestsBase : IDisposable
|
||||
{
|
||||
protected PocketClient client;
|
||||
|
||||
|
||||
// setup
|
||||
public TestsBase()
|
||||
{
|
||||
// !! please don't misuse this account !!
|
||||
client = new PocketClient(
|
||||
consumerKey: "15396-f6f92101d72c8e270a6c9bb3",
|
||||
callbackUri: "http://frontendplay.com",
|
||||
accessCode: "2c62cd50-b78a-5558-918b-65adae"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// teardown
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp.WP8", "PocketSh
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PocketSharp.Tests", "PocketSharp.Tests\PocketSharp.Tests.csproj", "{CA3C491B-A8CA-426C-A0BB-E91636767467}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{19DD45B5-B849-49E7-89D6-16C89B9B96C7}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.nuget\NuGet.Config = .nuget\NuGet.Config
|
||||
.nuget\NuGet.exe = .nuget\NuGet.exe
|
||||
.nuget\NuGet.targets = .nuget\NuGet.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
||||
Reference in New Issue
Block a user