mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 07:23:20 +08:00
Add test coverage showing RealmLive
failure after an attach
This commit is contained in:
parent
448b2d1190
commit
071a8c6709
@ -29,6 +29,22 @@ namespace osu.Game.Tests.Database
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestAccessAfterAttach()
|
||||||
|
{
|
||||||
|
RunTestWithRealm((realmFactory, _) =>
|
||||||
|
{
|
||||||
|
var beatmap = new RealmBeatmap(CreateRuleset(), new RealmBeatmapDifficulty(), new RealmBeatmapMetadata());
|
||||||
|
|
||||||
|
var liveBeatmap = beatmap.ToLive();
|
||||||
|
|
||||||
|
using (var context = realmFactory.CreateContext())
|
||||||
|
context.Write(r => r.Add(beatmap));
|
||||||
|
|
||||||
|
Assert.IsFalse(liveBeatmap.PerformRead(l => l.Hidden));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestAccessNonManaged()
|
public void TestAccessNonManaged()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user