osu/osu.Game.Tests/Visual/TestCasePlaybackControl.cs

42 lines
1.3 KiB
C#
Raw Normal View History

2018-01-05 11:21:19 +00:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-11-22 03:06:31 +00:00
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2018-03-02 06:34:31 +00:00
using NUnit.Framework;
2018-03-19 07:27:52 +00:00
using osu.Framework.Allocation;
using osu.Framework.Graphics;
2018-03-15 09:24:57 +00:00
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Screens.Edit.Components;
using osu.Game.Tests.Beatmaps;
using OpenTK;
namespace osu.Game.Tests.Visual
{
2018-03-02 06:34:31 +00:00
[TestFixture]
public class TestCasePlaybackControl : OsuTestCase
{
2018-03-19 07:27:52 +00:00
private DependencyContainer dependencies;
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
=> dependencies = new DependencyContainer(parent);
public TestCasePlaybackControl()
{
2018-03-15 09:24:57 +00:00
var clock = new DecoupleableInterpolatingFramedClock { IsCoupled = false };
2018-03-19 07:27:52 +00:00
dependencies.CacheAs<IAdjustableClock>(clock);
dependencies.CacheAs<IFrameBasedClock>(clock);
2018-03-15 09:24:57 +00:00
2018-03-19 07:27:52 +00:00
var playback = new PlaybackControl
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(200,100)
};
2018-03-19 07:27:52 +00:00
playback.Beatmap.Value = new TestWorkingBeatmap(new Beatmap());
Add(playback);
}
}
}