<commit_before>// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Overlays.Direct;
using osu.Game.Rulesets;
using osu.Game.Users;
using osuTK;

namespace osu.Game.Tests.Visual.Online
{
    public class TestSceneDirectPanel : OsuTestScene, IPreviewTrackOwner
    {
        public override IReadOnlyList<Type> RequiredTypes => new[]
        {
            typeof(DirectGridPanel),
            typeof(DirectListPanel),
            typeof(IconPill)
        };

        protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
        {
            var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
            dependencies.CacheAs<IPreviewTrackOwner>(this);
            return dependencies;
        }

        private BeatmapSetInfo getUndownloadableBeatmapSet() => new BeatmapSetInfo
        {
            OnlineBeatmapSetID = 123,
            Metadata = new BeatmapMetadata
            {
                Title = "undownloadable beatmap",
                Artist = "test",
                Source = "more tests",
                Author = new User
                {
                    Username = "BanchoBot",
                    Id = 3,
                },
            },
            OnlineInfo = new BeatmapSetOnlineInfo
            {
                Availability = new BeatmapSetOnlineAvailability
                {
                    DownloadDisabled = true,
                },
                Preview = @"https://b.ppy.sh/preview/12345.mp3",
                PlayCount = 123,
                FavouriteCount = 456,
                BPM = 111,
                HasVideo = true,<commit_msg>Use attribute instead of CreateChildDependencies<commit_after>// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Overlays.Direct;
using osu.Game.Rulesets;
using osu.Game.Users;
using osuTK;

namespace osu.Game.Tests.Visual.Online
{
    [Cached(typeof(IPreviewTrackOwner))]
    public class TestSceneDirectPanel : OsuTestScene, IPreviewTrackOwner
    {
        public override IReadOnlyList<Type> RequiredTypes => new[]
        {
            typeof(DirectGridPanel),
            typeof(DirectListPanel),
            typeof(IconPill)
        };

        private BeatmapSetInfo getUndownloadableBeatmapSet() => new BeatmapSetInfo
        {
            OnlineBeatmapSetID = 123,
            Metadata = new BeatmapMetadata
            {
                Title = "undownloadable beatmap",
                Artist = "test",
                Source = "more tests",
                Author = new User
                {
                    Username = "BanchoBot",
                    Id = 3,
                },
            },
            OnlineInfo = new BeatmapSetOnlineInfo
            {
                Availability = new BeatmapSetOnlineAvailability
                {
                    DownloadDisabled = true,
                },
                Preview = @"https://b.ppy.sh/preview/12345.mp3",
                PlayCount = 123,
                FavouriteCount = 456,
                BPM = 111,
                HasVideo = true,
{'fraction_non_alphanumeric': 0.07906850798808557, 'fraction_numerical': 0.010289737340915246, 'mean_word_length': 1.7984848484848486, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 14, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3627112', 'n_tokens_mistral': 1029, 'n_tokens_neox': 927, 'n_words': 224}