Esempio n. 1
0
        public async void Initialize_ServiceHasFriends_FriendsGetsSet()
        {
            m_httpClientMock.Setup(s => s.GetAsync(It.IsAny <Uri>())).ReturnsAsync("[\"Carl\"]");

            await m_mainViewModel.Initialize();

            Assert.NotEmpty(m_mainViewModel.Friends);
        }
Esempio n. 2
0
        public async Task Initialize()
        {
            var initialize = _mainViewModel?.Initialize();

            if (initialize != null)
            {
                await initialize;
            }
        }
        public MainWindow(IMainViewModel mainViewModel)
        {
            InitializeComponent();
            DataContext = mainViewModel;

            mainViewModel.CloseWindow    += (sender, arguments) => Close();
            mainViewModel.ShowHideWindow += MainViewModelOnShowHideWindow;

            mainViewModel.Initialize();
        }