コード例 #1
0
        public void TheSorterPutsAudioDramasThatAreNotAFavoriteBeforeTheAudioDramasMarkedAsFavorite()
        {
            var provider     = new SampleAudioDramaProvider();
            var sorter       = new IsFavoriteLastSorter();
            var audioDramas  = provider.Get().ToList();
            var expectedSort = audioDramas.OrderBy(x => x.AudioDramaUserData.IsFavorite).ToList();

            var sort = sorter.Sort(audioDramas).ToList();

            CollectionAssert.AreEqual(expectedSort, sort);
        }
コード例 #2
0
        public void TheSorterHasTheCorrectMode()
        {
            var sorter = new IsFavoriteLastSorter();

            Assert.AreEqual(EAudioDramaSortMode.IsFavoriteLast, sorter.SortMode);
        }