//couldnt figure out how to make this work, but what it would do is test the deck stack
        public void TestConstructor()
        {
            IDeckFactory           deckFactory     = new StandardDeckFactory();
            IDeck                  deck            = deckFactory.CreateDeck();
            ISolitaireGameInstance game            = new SolitaireGameInstance(deck);
            IEventAggregator       eventAggregator = new EventAggregator();
            var viewModel = new OverflowCardStackViewModel(game, eventAggregator);

            Assert.AreEqual(viewModel.TopCard, game.OverflowStack[game.OverflowStack.Count - 1]);
Esempio n. 2
0
        protected override void ConfigureContainer()
        {
            base.ConfigureContainer();

            Container.RegisterType <IEventAggregator, EventAggregator>(
                new ContainerControlledLifetimeManager());

            var deckFactory = new StandardDeckFactory();
            var deck        = deckFactory.CreateDeck();

            Container.RegisterInstance(deck, new ContainerControlledLifetimeManager());

            Container.RegisterType <ISolitaireGameInstance, SolitaireGameInstance>(
                new ContainerControlledLifetimeManager());
        }