public void Context() { TestMessenger = new TestMessagingController(); ReceivedMessages = new[] {new Message()}; View = new MessagingViewModel(TestMessenger); Because(); }
protected void Context() { TestMessagingController = new TestMessagingController(); ViewModel = new MessagingViewModel(TestMessagingController); ViewModel.MessageToSend = MessageToBeSent; ViewModel.Recipient = IntendedRecipient; }
void App_Startup(object sender, StartupEventArgs e) { var messagingPlugInRepository = new MessagingPlugInRepository(); var messagingPluginFinder = new MessagingPluginFinder(messagingPlugInRepository); var unifiedMessenger = new UnifiedMessenger(messagingPlugInRepository); var messagingFiber = new AsyncFiber(Dispatcher); var cachedCredentialRepository = new MessagingCredentialCache(messagingPlugInRepository); var userSecurityPrompt = new UserSecurityPrompt(messagingFiber); messagingPlugInRepository.OnCredentialsRequestedNotify(cachedCredentialRepository); cachedCredentialRepository.OnCredentialsRequestedNotify(userSecurityPrompt); cachedCredentialRepository.OnCredentialsProvidedNotify(unifiedMessenger); userSecurityPrompt.OnCredentialsProvidedNotify(cachedCredentialRepository); var codePasteToUrlService = new CodePasteToUrlService(); var automaticMessageFormatting = new AutoFormatCodePastesAsUrls(codePasteToUrlService); var messageRepository = new MessageRepository(); var unifiedMessagingController = new UnifiedMessagingController(unifiedMessenger, messageRepository, automaticMessageFormatting, messagingFiber); automaticMessageFormatting.OnMessageToSendNotify(unifiedMessagingController); var messagingViewModel = new MessagingViewModel(unifiedMessagingController); var messagingWindow = new MessagingWindow(messagingViewModel); messageRepository.OnAddedMessagesNotify(unifiedMessagingController); unifiedMessagingController.OnReceivedMessagesNotify(messagingViewModel); messagingPluginFinder.GetAllPlugins(); unifiedMessagingController.StartReceiving(); unifiedMessagingController.RequestMessageUpdate(); messagingWindow.Show(); }