You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/src/NzbDrone.Core.Test/Datastore/DatabaseFixture.cs

37 lines
905 B

using System;
using System.Linq;
using Dapper;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Music;
using NzbDrone.Core.Test.Framework;
namespace NzbDrone.Core.Test.Datastore
{
public class DatabaseFixture : DbTest
{
[Test]
public void SingleOrDefault_should_return_null_on_empty_db()
{
Mocker.Resolve<IDatabase>()
.OpenConnection().Query<Artist>("SELECT * FROM \"Artists\"")
.SingleOrDefault(c => c.CleanName == "SomeTitle")
.Should()
.BeNull();
}
[Test]
public void vacuum()
{
Mocker.Resolve<IDatabase>().Vacuum();
}
[Test]
public void get_version()
{
Mocker.Resolve<IDatabase>().Version.Should().BeGreaterThan(new Version("3.0.0"));
}
}
}