Esempio n. 1
0
        public void TestDifferentExtension()
        {
            beatmap.BeatmapInfo.BeatmapSet.Files.Clear();
            beatmap.BeatmapInfo.BeatmapSet.Files.Add(CheckTestHelpers.CreateMockFile("jpg"));

            // Should fail to load, but not produce an error due to the extension not being expected to load.
            Assert.IsEmpty(check.Run(getContext(null, allowMissing: true)));
        }
Esempio n. 2
0
 public void Setup()
 {
     check   = new CheckZeroByteFiles();
     beatmap = new Beatmap <HitObject>
     {
         BeatmapInfo = new BeatmapInfo
         {
             BeatmapSet = new BeatmapSetInfo
             {
                 Files =
                 {
                     CheckTestHelpers.CreateMockFile("jpg"),
                 }
             }
         }
     };
 }
Esempio n. 3
0
 public void Setup()
 {
     check   = new CheckAudioInVideo();
     beatmap = new Beatmap <HitObject>
     {
         BeatmapInfo = new BeatmapInfo
         {
             BeatmapSet = new BeatmapSetInfo
             {
                 Files =
                 {
                     CheckTestHelpers.CreateMockFile("mp4"),
                 }
             }
         }
     };
 }
Esempio n. 4
0
        public void Setup()
        {
            var file = CheckTestHelpers.CreateMockFile("jpg");

            check   = new CheckBackgroundQuality();
            beatmap = new Beatmap <HitObject>
            {
                BeatmapInfo = new BeatmapInfo
                {
                    Metadata = new BeatmapMetadata {
                        BackgroundFile = file.Filename
                    },
                    BeatmapSet = new BeatmapSetInfo
                    {
                        Files = { file }
                    }
                }
            };
        }
Esempio n. 5
0
        public void Setup()
        {
            check   = new CheckTooShortAudioFiles();
            beatmap = new Beatmap <HitObject>
            {
                BeatmapInfo = new BeatmapInfo
                {
                    BeatmapSet = new BeatmapSetInfo
                    {
                        Files = { CheckTestHelpers.CreateMockFile("wav") }
                    }
                }
            };

            // 0 = No output device. This still allows decoding.
            if (!Bass.Init(0) && Bass.LastError != Errors.Already)
            {
                throw new AudioException("Could not initialize Bass.");
            }
        }