public void FailToStartNewGameWithoutCategories() { var questionsRepository = new FakeQuestionsRepository(); Check.ThatCode(() => Game.StartNew(questionsRepository, "test", new string[] { })) .Throws <Exception>(); }
public void StartNewGame() { var questionsRepository = new FakeQuestionsRepository(); var gameStarted = Game.StartNew(questionsRepository, "test", new [] { "Sports", "Science" }); Check.That(gameStarted.Name).IsEqualTo("test"); Check.That(gameStarted.GameCategories.Select(x => (x.Name, x.Questions.Count))) .ContainsExactly(("Sports", 50), ("Science", 50)); }