This commit is contained in:
Nicolas Constant 2021-01-22 23:43:56 -05:00
parent 34cb33160a
commit f6ed37b46a
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688
4 changed files with 9 additions and 37 deletions

View file

@ -22,14 +22,7 @@ namespace BirdsiteLive.DAL.Postgres.Tests.DataAccessLayers
public async Task CleanUp()
{
var dal = new DbInitializerPostgresDal(_settings, _tools);
try
{
await dal.DeleteAllAsync();
}
catch (Exception e)
{
Console.WriteLine(e);
}
await dal.DeleteAllAsync();
}
[TestMethod]

View file

@ -13,21 +13,14 @@ namespace BirdsiteLive.DAL.Postgres.Tests.DataAccessLayers
public async Task CleanUp()
{
var dal = new DbInitializerPostgresDal(_settings, _tools);
try
{
await dal.DeleteAllAsync();
}
catch (Exception e)
{
Console.WriteLine(e);
}
await dal.DeleteAllAsync();
}
[TestMethod]
public async Task GetCurrentDbVersionAsync_UninitializedDb()
{
var dal = new DbInitializerPostgresDal(_settings, _tools);
var current = await dal.GetCurrentDbVersionAsync();
Assert.IsNull(current);
}

View file

@ -24,14 +24,7 @@ namespace BirdsiteLive.DAL.Postgres.Tests.DataAccessLayers
public async Task CleanUp()
{
var dal = new DbInitializerPostgresDal(_settings, _tools);
try
{
await dal.DeleteAllAsync();
}
catch (Exception e)
{
Console.WriteLine(e);
}
await dal.DeleteAllAsync();
}
[TestMethod]
@ -39,7 +32,7 @@ namespace BirdsiteLive.DAL.Postgres.Tests.DataAccessLayers
{
var acct = "myhandle";
var host = "domain.ext";
var following = new[] {12, 19, 23};
var following = new[] { 12, 19, 23 };
var followingSync = new Dictionary<int, long>()
{
{12, 165L},
@ -48,7 +41,7 @@ namespace BirdsiteLive.DAL.Postgres.Tests.DataAccessLayers
};
var inboxRoute = "/myhandle/inbox";
var sharedInboxRoute = "/inbox";
var dal = new FollowersPostgresDal(_settings);
await dal.CreateFollowerAsync(acct, host, inboxRoute, sharedInboxRoute, following, followingSync);
@ -106,7 +99,7 @@ namespace BirdsiteLive.DAL.Postgres.Tests.DataAccessLayers
//User 1
var acct = "myhandle1";
var host = "domain.ext";
var following = new[] { 1,2,3 };
var following = new[] { 1, 2, 3 };
var followingSync = new Dictionary<int, long>();
var inboxRoute = "/myhandle1/inbox";
var sharedInboxRoute = "/inbox";
@ -203,7 +196,7 @@ namespace BirdsiteLive.DAL.Postgres.Tests.DataAccessLayers
};
result.Followings = updatedFollowing.ToList();
result.FollowingsSyncStatus = updatedFollowingSync;
await dal.UpdateFollowerAsync(result);
result = await dal.GetFollowerAsync(acct, host);

View file

@ -22,14 +22,7 @@ namespace BirdsiteLive.DAL.Postgres.Tests.DataAccessLayers
public async Task CleanUp()
{
var dal = new DbInitializerPostgresDal(_settings, _tools);
try
{
await dal.DeleteAllAsync();
}
catch (Exception e)
{
Console.WriteLine(e);
}
await dal.DeleteAllAsync();
}
[TestMethod]