Ejemplo n.º 1
0
 public GameHub(GameState gameState, UserState userState, GameViewModelFactory gameViewModelFactory, IHubContext <OverviewHub> overviewHubContext)
 {
     _gameState            = gameState;
     _userState            = userState;
     _gameViewModelFactory = gameViewModelFactory;
     _overviewHubContext   = overviewHubContext;
 }
Ejemplo n.º 2
0
 public UserController(UserState userState, GameState gameState, IHubContext <OverviewHub> overviewHubContext, IHubContext <GameHub> gameHubContexst, GameViewModelFactory gameViewModelFactory)
 {
     _userState            = userState;
     _gameState            = gameState;
     _overviewHubContext   = overviewHubContext;
     _gameHubContexst      = gameHubContexst;
     _gameViewModelFactory = gameViewModelFactory;
 }
        public void WhenConstructed_IntializesValues()
        {
            //Prepare
            Mock <INewsService> mockedNewService = new Mock <INewsService>();

            mockedNewService.Setup(x => x.GetNews(It.IsAny <string[]>()));

            //Act
            GameViewModelFactory target = new GameViewModelFactory(mockedNewService.Object);

            //Verify
            Assert.IsInstanceOfType(target.Create(), typeof(GameViewModel));
        }
Ejemplo n.º 4
0
 public MainViewModel(GameViewModelFactory gameViewModelFactory, IUserInterfaceService userInterfaceService)
 {
     _gameViewModelFactory = gameViewModelFactory;
     _userInterfaceService = userInterfaceService;
 }