public void CreateDeck_Shuffle_called_when_expected(bool shuffle) { // Arrange var options = new CreateDeckOptions { Shuffled = shuffle }; var pile = new Pile(null, PileType.Deck, "test-pile"); // Act _factory.AddDeckCardsToPile(ShitheadGameConfig.Default, pile, options); // Assert if (shuffle) { _shuffler.ReceivedWithAnyArgs(1).Shuffle <Card>(null); } else { _shuffler.DidNotReceiveWithAnyArgs().Shuffle <Card>(null); } }