public void MineToddThatcher_MineAndSolve() { var fmlMiner = new MineFantasyMovieLeagueBoxOffice(); var test = new MineToddThatcher(); var moviePicker = new TopMoviePicker(new MovieList()); var fmlMovies = fmlMiner.Mine(); var actual = test.Mine(); Assert.IsNotNull(actual); Assert.IsTrue(actual.Any(), "The list was empty."); AssignMovies(fmlMovies, actual); Logger.WriteLine("\n==== Todd M Thatcher ====\n"); WriteMovies(actual.OrderByDescending(item => item.Earnings)); moviePicker.AddMovies(actual); var movieLists = moviePicker.ChooseBest(10); Logger.WriteLine("\n==== BONUS ON PICKS ====\n"); foreach (var movieList in movieLists) { WriteMovies(movieList.Movies); Logger.WriteLine(string.Empty); } }
public void MinerModel_To10pMoviePicker() { var test = ConstructTest(); var moviePicker = new TopMoviePicker(new MovieList()); var sw = new Stopwatch(); sw.Start(); moviePicker.AddMovies(test.Miners[TODD_INDEX].Movies); var movieLists = moviePicker.ChooseBest(10); sw.Stop(); Logger.WriteLine($"Total milliseconds: {sw.ElapsedMilliseconds:N}"); Logger.WriteLine("\n==== BONUS ON PICKS ====\n"); WritePicker(moviePicker); foreach (var movieList in movieLists) { Logger.WriteLine(string.Empty); WriteMovies(movieList); } }