protected void Configure() { var mockEventAggregator = new MockEventAggregator(); var mockSubsonicService = new MockSubsonicService(); var mockNavigationService = new MockNavigationService(); var mockNotificationService = new MockToastNotificationService(); var mockDialogNotificationService = new MockDialogNotificationService(); var mockStorageService = new MockStorageService(); var mockWinRTWrappersService = new MockWinRTWrappersService(); var shellViewModel = new ShellViewModel(mockEventAggregator, mockSubsonicService, mockNavigationService, mockNotificationService, mockDialogNotificationService, mockStorageService, mockWinRTWrappersService); IoC.GetInstance = (type, s) => { object instance = null; if (type == typeof(IShellViewModel)) { instance = shellViewModel; } else if (type == typeof(ISubsonicService)) { instance = mockSubsonicService; } return(instance); }; }
public void Setup() { _mockSubsonicService = new MockSubsonicService(); _mockStorageService = new MockStorageService(); _mockToastNotificationService = new MockToastNotificationService(); _mockNavigationService = new MockNavigationService(); _subject = new SettingsViewModel(_mockSubsonicService, _mockToastNotificationService, _mockStorageService, _mockNavigationService); }
public void Setup() { _mockToastNotificationService = new MockToastNotificationService(); _mockTileNotificationService = new MockTileNotificationService(); _subject = new NotificationsHelper { EventAggregator = new MockEventAggregator(), TileNotificationService = _mockTileNotificationService, ToastNotificationService = _mockToastNotificationService }; }
public void TestInitialize() { IoC.GetInstance = (type, s) => null; _mockSubsonicService = new MockSubsonicService(); _mockNavigationService = new MockNavigationService(); _mockToastNotificationService = new MockToastNotificationService(); _mockDialogNotificationService = new MockDialogNotificationService(); _mockStorageService = new MockStorageService(); _mockWinRTWrappersService = new MockWinRTWrappersService(); _mockPlayerControls = new MockPlayerControls(); Subject = new ShellViewModel(_eventAggregator, _mockSubsonicService, _mockNavigationService, _mockToastNotificationService, _mockDialogNotificationService, _mockStorageService, _mockWinRTWrappersService) { PlayerControls = _mockPlayerControls }; }
protected override void TestInitializeExtensions() { _mockToastNotificationService = new MockToastNotificationService(); _mockWinRTWrappersService = new MockWinRTWrappersService(); _mockPlaylistManagementService = new MockPlyalistManagementService(); _mockEmbededVideoPlaybackViewModel = new MockEmbededVideoPlaybackViewModel(); Subject.WinRTWrappersService = _mockWinRTWrappersService; Subject.PlaylistManagementService = _mockPlaylistManagementService; Subject.EmbededVideoPlaybackViewModel = _mockEmbededVideoPlaybackViewModel; Subject.ToastNotificationService = _mockToastNotificationService; Subject.LoadModel = model => { var tcr = new TaskCompletionSource <PlaylistItem>(); tcr.SetResult(new PlaylistItem()); return(tcr.Task); }; }
protected override void TestInitializeExtensions() { _mockToastNotificationService = new MockToastNotificationService(); _mockWinRTWrappersService = new MockWinRTWrappersService(); _mockPlaylistManagementService = new MockPlyalistManagementService(); _mockPlayerManagementService = new MockPlayerManagementService(); _mockEmbeddedVideoPlaybackViewModel = new MockEmbeddedVideoPlaybackViewModel(); _mockSnappedVideoPlaybackViewModel = new MockSnappedVideoPlaybackViewModel(); _mockFullScreenVideoPlaybackViewModel = new MockFullScreenVideoPlaybackViewModel(); _mockArtistInfoViewModel = new MockArtistInfoViewModel(); Subject.WinRTWrappersService = _mockWinRTWrappersService; Subject.PlaylistManagementService = _mockPlaylistManagementService; Subject.PlayerManagementService = _mockPlayerManagementService; Subject.EmbeddedVideoPlaybackViewModel = _mockEmbeddedVideoPlaybackViewModel; Subject.ToastNotificationService = _mockToastNotificationService; Subject.SnappedVideoPlaybackViewModel = _mockSnappedVideoPlaybackViewModel; Subject.FullScreenVideoPlaybackViewModel = _mockFullScreenVideoPlaybackViewModel; Subject.ArtistInfoViewModel = _mockArtistInfoViewModel; }
protected override void TestInitializeExtensions() { base.TestInitializeExtensions(); _mockToastNotificationService = new MockToastNotificationService(); Subject.ToastNotificationService = _mockToastNotificationService; }