mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09:00
Add Live<>
casting test
This commit is contained in:
parent
b01d82b3fd
commit
81a0fbfc40
@ -6,6 +6,7 @@ using System.Diagnostics;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Models;
|
using osu.Game.Models;
|
||||||
using Realms;
|
using Realms;
|
||||||
@ -16,6 +17,19 @@ namespace osu.Game.Tests.Database
|
|||||||
{
|
{
|
||||||
public class RealmLiveTests : RealmTest
|
public class RealmLiveTests : RealmTest
|
||||||
{
|
{
|
||||||
|
[Test]
|
||||||
|
public void TestLiveCastability()
|
||||||
|
{
|
||||||
|
RunTestWithRealm((realmFactory, _) =>
|
||||||
|
{
|
||||||
|
RealmLive<RealmBeatmap> beatmap = realmFactory.CreateContext().Write(r => r.Add(new RealmBeatmap(CreateRuleset(), new RealmBeatmapDifficulty(), new RealmBeatmapMetadata()))).ToLive();
|
||||||
|
|
||||||
|
ILive<IBeatmapInfo> iBeatmap = beatmap;
|
||||||
|
|
||||||
|
Assert.AreEqual(0, iBeatmap.Value.Length);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestValueAccessWithOpenContext()
|
public void TestValueAccessWithOpenContext()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user