Exemplo n.º 1
0
 public static ShellViewModel ShellViewModelFactory(Dictionary <string, object> mockObjects)
 {
     return(new ShellViewModel(
                (IClipboardManager)mockObjects[nameof(IClipboardManager)],
                (INHotkeyManagerMapper)mockObjects[nameof(INHotkeyManagerMapper)],
                (ISnackbarMessageQueue)mockObjects[nameof(ISnackbarMessageQueue)],
                (IEventAggregator)mockObjects[nameof(IEventAggregator)],
                (IDialogHostMapper)mockObjects[nameof(IDialogHostMapper)],
                (ILoggerManager)mockObjects[nameof(ILoggerManager)],
                new MainViewModel(          // ToDo Factorize
                    MockFactories.DeepLinkCollectionViewModelFactory(GetMockObjects()),
                    MockFactories.DeepLinkHistoryViewModelFactory(GetMockObjects())),
                new AboutViewModel()));
 }
Exemplo n.º 2
0
 public static Dictionary <string, object> GetMockObjects()
 {
     return(new Dictionary <string, object>()
     {
         { nameof(IConfigurationCollection), MockFactories.GetConfigurationCollection() },
         { nameof(IClipboardManager), MockFactories.GetClipboardManager() },
         { nameof(IDeepLinkManager), MockFactories.GetDeepLinkManager() },
         { nameof(IMapper), MockFactories.GetMapper() },
         { nameof(IEventAggregator), MockFactories.GetEventAggregator() },
         { nameof(INHotkeyManagerMapper), MockFactories.GetINHotkeyManagerMapper() },
         { nameof(ISnackbarMessageQueue), MockFactories.GetISnackbarMessageQueue() },
         { nameof(IDialogHostMapper), MockFactories.GetIDialogHostMapper() },
         { nameof(IBrowserManager), MockFactories.GetBrowserManager() },
         { nameof(ILoggerManager), MockFactories.GetLoggerManager() },
     });
 }