1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

Swap to dapper and system.text.json for database backend

This commit is contained in:
ta264
2019-12-15 15:04:42 +00:00
parent 7b17c3e36c
commit d2065bfa1b
155 changed files with 2333 additions and 2340 deletions
@@ -1,10 +1,11 @@
using System;
using System.Linq;
using Dapper;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Movies;
using NzbDrone.Core.Test.Framework;
namespace NzbDrone.Core.Test.Datastore
{
@@ -14,15 +15,15 @@ namespace NzbDrone.Core.Test.Datastore
public void SingleOrDefault_should_return_null_on_empty_db()
{
Mocker.Resolve<IDatabase>()
.GetDataMapper().Query<Movie>()
.SingleOrDefault(c => c.CleanTitle == "SomeTitle")
.OpenConnection().Query<Movie>("SELECT * FROM Movies")
.SingleOrDefault()
.Should()
.BeNull();
}
[Test]
public void vaccume()
public void vacuum()
{
Mocker.Resolve<IDatabase>().Vacuum();
}