From 6cf9892f78b6ac467abcc2393ed4c38bd03fb20e Mon Sep 17 00:00:00 2001 From: ceee Date: Sun, 15 Sep 2013 21:52:28 +0200 Subject: [PATCH] disposable base for tests; classes for other tests --- PocketSharp.Tests/AddTests.cs | 13 +++++++++ PocketSharp.Tests/AuthenticationTests.cs | 13 +++++++++ PocketSharp.Tests/ModifyTagsTests.cs | 13 +++++++++ PocketSharp.Tests/ModifyTests.cs | 13 +++++++++ PocketSharp.Tests/PocketSharp.Tests.csproj | 5 ++++ PocketSharp.Tests/RetrieveTests.cs | 18 ++---------- PocketSharp.Tests/TestsBase.cs | 32 ++++++++++++++++++++++ PocketSharp.sln | 7 +++++ 8 files changed, 98 insertions(+), 16 deletions(-) create mode 100644 PocketSharp.Tests/AddTests.cs create mode 100644 PocketSharp.Tests/AuthenticationTests.cs create mode 100644 PocketSharp.Tests/ModifyTagsTests.cs create mode 100644 PocketSharp.Tests/ModifyTests.cs create mode 100644 PocketSharp.Tests/TestsBase.cs diff --git a/PocketSharp.Tests/AddTests.cs b/PocketSharp.Tests/AddTests.cs new file mode 100644 index 0000000..8c60188 --- /dev/null +++ b/PocketSharp.Tests/AddTests.cs @@ -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() { } + } +} diff --git a/PocketSharp.Tests/AuthenticationTests.cs b/PocketSharp.Tests/AuthenticationTests.cs new file mode 100644 index 0000000..38e5698 --- /dev/null +++ b/PocketSharp.Tests/AuthenticationTests.cs @@ -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() { } + } +} diff --git a/PocketSharp.Tests/ModifyTagsTests.cs b/PocketSharp.Tests/ModifyTagsTests.cs new file mode 100644 index 0000000..fa237d9 --- /dev/null +++ b/PocketSharp.Tests/ModifyTagsTests.cs @@ -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() { } + } +} diff --git a/PocketSharp.Tests/ModifyTests.cs b/PocketSharp.Tests/ModifyTests.cs new file mode 100644 index 0000000..91dce95 --- /dev/null +++ b/PocketSharp.Tests/ModifyTests.cs @@ -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() { } + } +} diff --git a/PocketSharp.Tests/PocketSharp.Tests.csproj b/PocketSharp.Tests/PocketSharp.Tests.csproj index af99fe1..9b5b20e 100644 --- a/PocketSharp.Tests/PocketSharp.Tests.csproj +++ b/PocketSharp.Tests/PocketSharp.Tests.csproj @@ -66,8 +66,13 @@ + + + + + diff --git a/PocketSharp.Tests/RetrieveTests.cs b/PocketSharp.Tests/RetrieveTests.cs index b42c995..4ebee4c 100644 --- a/PocketSharp.Tests/RetrieveTests.cs +++ b/PocketSharp.Tests/RetrieveTests.cs @@ -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] diff --git a/PocketSharp.Tests/TestsBase.cs b/PocketSharp.Tests/TestsBase.cs new file mode 100644 index 0000000..f43ff6e --- /dev/null +++ b/PocketSharp.Tests/TestsBase.cs @@ -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() + { + + } + } +} diff --git a/PocketSharp.sln b/PocketSharp.sln index 89e25b5..0dc1a27 100644 --- a/PocketSharp.sln +++ b/PocketSharp.sln @@ -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