Files
PocketSharp/PocketSharp.Tests/TestsBase.cs
T

38 lines
737 B
C#

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;
protected List<int> itemsToDelete = new List<int>();
// 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()
{
itemsToDelete.ForEach(async id =>
{
await client.Delete(id);
});
}
}
}