예제 #1
0
        public IEnumerable<BaseGenre> RebuildGenreTree()
        {
            var autoBiography = new AutoBiographyGenre();
            var memoire = new MemoirGenre();
            var biography = new BiographyGenre();

            var alternateHistory = new AlternateHistoryGenre();
            var periodPiece = new PeriodPieceGenre();
            var costumeDrama = new CostumeDramaGenre();
            var jidaigeki = new JidaigekiGenre();
            var historicalFiction = new HistoricalFictionGenre();

            var historical = new HistoricalGenre();
            var genres = new List<BaseGenre>();

            biography.AddSubGenre(autoBiography);
            biography.AddSubGenre(memoire);
            historicalFiction.AddSubGenre(alternateHistory);
            historicalFiction.AddSubGenre(periodPiece);
            historicalFiction.AddSubGenre(costumeDrama);
            historicalFiction.AddSubGenre(jidaigeki);
            historical.AddSubGenre(biography);
            historical.AddSubGenre(historicalFiction);

            genres.Add(historical);
            return genres;
        }
예제 #2
0
파일: Beeks.cs 프로젝트: boriscallens/Beek
 public void IsChildWorksThroughEntireTree()
 {
     HistoricalFictionGenre history = new HistoricalFictionGenre();
     FantasyGenre fantasy = new FantasyGenre();
     CostumeDramaGenre costume = new CostumeDramaGenre();
     history.AddSubGenre(fantasy);
     fantasy.AddSubGenre(costume);
     Assert.IsTrue(costume.IsChildOf(history));
 }
예제 #3
0
파일: Beeks.cs 프로젝트: boriscallens/Beek
 public void IsParentWorksThroughEntireBranch()
 {
     HistoricalFictionGenre history = new HistoricalFictionGenre();
     FantasyGenre fantasy = new FantasyGenre();
     CostumeDramaGenre costume = new CostumeDramaGenre();
     history.AddSubGenre(fantasy);
     fantasy.AddSubGenre(costume);
     Assert.IsTrue(history.IsParentOf(costume));
 }
예제 #4
0
파일: Beeks.cs 프로젝트: boriscallens/Beek
 public void CantAddParentGenreAsSubGenre()
 {
     FantasyGenre fantasy = new FantasyGenre();
     HistoricalFictionGenre history = new HistoricalFictionGenre();
     history.AddSubGenre(fantasy);
     fantasy.AddSubGenre(history);
 }