public ActionResult List() { if (!Request.Browser.IsMobileDevice) { return(RedirectToAction("IndexDesktop", "Home")); } if (!User.Identity.IsAuthenticated) { return(RedirectToAction("Login", "Account")); } string cellNum = User.Identity.Name; if (cellNum == null) { return(RedirectToAction("Login", "Account")); } User user = db.Users.FirstOrDefault(current => current.IsActive && !current.IsDeleted && current.CellNum == cellNum); if (user == null) { return(RedirectToAction("Login", "Account")); } List <Message> messages = db.Messages.Where(c => c.UserId == user.Id && c.IsDeleted == false).OrderByDescending(c => c.CreationDate).ToList(); MessageListViewModel messageList = new MessageListViewModel(); messageList.Messages = messages; return(View(messageList)); }
public async Task <IActionResult> About(MessageListViewModel model, string id) { if (!ModelState.IsValid || model.Id != id) { return(View(model)); } else { var ids = id.Split("tire"); var userId = ids[0]; var dogId = Guid.Parse(ids[1]); var message = new Message { SubjectId = dogId, ReceiverId = userId, Sender = context.Users.Single(u => u.Id == userManager.GetUserId(User)), CreatedOn = DateTime.UtcNow, Content = model.Content }; context.Messages.Add(message); await context.SaveChangesAsync(); return(RedirectToAction("About", "Messages", userId + "tire" + dogId)); } }
public MessageFlowViewModel( IServiceControl serviceControl, IEventAggregator eventAggregator, IWindowManagerEx windowManager, SearchBarViewModel searchBar, MessageListViewModel messageList, Func <ExceptionDetailViewModel> exceptionDetail, ISettingsProvider settingsProvider, EndpointExplorerViewModel endpointExplorer, IClipboard clipboard) { this.serviceControl = serviceControl; this.eventAggregator = eventAggregator; this.windowManager = windowManager; this.settingsProvider = settingsProvider; this.messageList = messageList; this.endpointExplorer = endpointExplorer; this.exceptionDetail = exceptionDetail; CopyConversationIDCommand = new CopyConversationIDCommand(clipboard); CopyMessageURICommand = new CopyMessageURICommand(clipboard, serviceControl); SearchByMessageIDCommand = new SearchByMessageIDCommand(eventAggregator, searchBar); RetryMessageCommand = new RetryMessageCommand(eventAggregator, serviceControl); Diagram = new MessageFlowDiagram(); nodeMap = new ConcurrentDictionary <string, MessageNode>(); }
public ActionResult Index() { MessageListViewModel model = new MessageListViewModel(); model.CountriesList = DropdownData.GetCachedCountriesList(); model.Message = "Faites une sélection d'un pays"; return(View("List", model)); }
public IActionResult AllMessages() { var viewModel = new MessageListViewModel { Messages = this.messagesService.GetAll(), }; return(this.View(viewModel)); }
public ActionResult List(MessageListViewModel model) { model.CountriesList = DropdownData.GetCachedCountriesList(); var pays = model.CountriesList.Where(p => p.Value == model.SelectedIdCountry).Select(p => p.Text).First(); model.Message = string.Format("Vous avez sélectionné {0}", pays); return(View(model)); }
public async Task <IActionResult> Index() { MessageListViewModel viewModel = new MessageListViewModel { Messages = await this._messageService.GetAllMessagesForUserAsync(User.Identity.Name) }; return(View(viewModel)); }
public HttpResponseMessage MessageList([FromUri] MessageListRequest request) { _logAppInfo.Info(string.Format("消息列表获取接口请求串:{0}", Request.RequestUri)); MessageListViewModel viewModel = new MessageListViewModel(); var response = _messageService.MessageListNew(request, Request.GetQueryNameValuePairs()); viewModel.BusinessStatus = response.ErrCode; viewModel.StatusMessage = response.ErrMsg; viewModel.MsgList = response.MsgList; viewModel.TotalCount = response.TotalCount; return(viewModel.ResponseToJson()); }
public void Test_GetMessageViewModel() { //Arrange MessageListViewModel messageListVM = new MessageListViewModel(); messageController.Login("*****@*****.**", "Dhjnvytyjub1"); //Act messageListVM = messageController.LoadMessageListViewModel(); //Assert Assert.NotNull(messageListVM.MessageVMList.Messages); Assert.Greater(messageListVM.MessageVMList.Messages.Count, 0); }
public void Setup() { _dataService = new Mock<IDataService>(); _mapControl = new Mock<IMapControl>(); _messages = new List<MessageViewModel>() { new MessageViewModel() {MessagesID = 2, NoBloc = "b2"}, new MessageViewModel() {MessagesID = 12, NoBloc = "b12"} }; _viewModel = new MessageListViewModel(_dataService.Object, _mapControl.Object); _dataService.Setup(x => x.GeneralQuery<MessageViewModel>(It.IsAny<ITable>(), null)).Returns(_messages); }
public IActionResult Messages() { var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier); var messages = _context.Message.Where(p => p.CustomerId == userId && p.SenderCustomer == false).OrderByDescending(o => o.DateCreation).ToList(); MessageListViewModel model = new MessageListViewModel(); model.Messages = messages; return(View(model)); }
public AppViewModel(string val) { if (val == "Contact") { ContactListVM = new ContactListViewModel(dataContactService); CurrentView = ContactListVM; } if (val == "Message") { MessageListVM = new MessageListViewModel(dataMessageService); CurrentView = MessageListVM; } }
public void TestInitialize() { EventAggregator = Substitute.For <IEventAggregator>(); ServiceControl = Substitute.For <IServiceControl>(); SearchBar = Substitute.For <ISearchBarViewModel>(); View = Substitute.For <IMessageListView>(); MessageList = new MessageListViewModel(EventAggregator, ServiceControl, SearchBar, Substitute.For <IErrorHeaderViewModel>(), Substitute.For <IGeneralHeaderViewModel>(), Substitute.For <IClipboard>()); MessageList.AttachView(View, null); }
public override IViewModel GetViewModel() { var messageviewModel = new MessageListViewModel(); List <Message> messageList = messagesGet(50, MessageDirection.In) as List <Message>; List <User> userList = new UserService() .usersGet(messageList.Select(x => x.Uid) .Distinct() .ToArray()) as List <User>; //Происходит маппинг return(messageviewModel); }
/// <summary> /// 优惠列表查询 /// </summary> public ActionResult MessageList(MessageListSearchModel search) { MessageListViewModel model = new MessageListViewModel(); //页面模型 model.search = search; //页面的搜索模型 model.search.PageSize = 15; //每页显示 model.search.CurrentPage = Convert.ToInt32(Request["pageindex"]) <= 0 ? 1 : Convert.ToInt32(Request["pageindex"]); //当前页 //多沟选框 List <DataProvider.Data.CommonData.SYS_Role> SourceIL = CommonData.GetSYS_SystemRoleList(3); ViewData["SYS_Role"] = SourceIL; model.Messagelist = MessageData.GetMessageList(search); //填充页面模型数据 return(View(model)); //返回页面模型 }
public async Task <IActionResult> List(int botId) { if (botId > 0) { var messageList = await _context.Messages.Where(x => x.BotId == botId).ToListAsync(); var model = new MessageListViewModel { BotId = botId, Messages = messageList }; return(View(model)); } return(Redirect(Url.Action("List", "Bot"))); }
public ApplicationController(CompositionContainer container, IMessageService messageService, IPresentationService presentationService, ShellService shellService, ShellViewModel shellViewModel, MessageListViewModel msgListViewModel, AboutBoxViewModel abViewModel) { presentationService.InitializeCultures(); this.container = container; this.messageService = messageService; this.shellService = shellService; this.shellViewModel = shellViewModel; this.msgListViewModel = msgListViewModel; this.abViewModel = abViewModel; shellService.ShellView = shellViewModel.View; exitCommand = new DelegateCommand(Close); msgQueue = new Queue<MessageItem>(); }
public IActionResult Index() { var messages = _messageRepository.GetLastMessages(); var viewModel = new MessageListViewModel() { Messages = messages.Select(m => new MessageListItemViewModel() { Text = _imageService.ReplaceTextWithImages(m.Text), UserName = m.User.Name, }), ImageKeys = _imageService.GetAllImageKeys(), }; return(View(viewModel)); }
public MessageListViewModel LoadMessageListViewModel() { messageService = new MessageService(); UserService userService = new UserService(); List <Message> messageListIn = (List <Message>)messageService.messagesGet(50, Services.MessageDirection.In); List <User> userListIn = (List <User>)userService.usersGet(messageListIn.Select(m => m.Uid).ToArray()); List <Message> messageListOut = (List <Message>)messageService.messagesGet(50, Services.MessageDirection.Out); List <User> userListOut = (List <User>)userService.usersGet(messageListOut.Select(m => m.Uid).ToArray()); MessageViewModel incomingMessage = new MessageViewModel() { Name = "Incoming" }; foreach (var message in messageListIn) { incomingMessage.Messages.Add(new MessageModel { Message = message, User = userListIn.Find(u => u.Uid == message.Uid) }); } MessageViewModel outgoingMessage = new MessageViewModel() { Name = "Outgoing" }; foreach (var message in messageListOut) { outgoingMessage.Messages.Add(new MessageModel { Message = message, User = userListOut.Find(u => u.Uid == message.Uid) }); } MessageListViewModel viewModel = new MessageListViewModel(); viewModel.Pages.Add(incomingMessage); viewModel.Pages.Add(outgoingMessage); return(viewModel); }
public IActionResult About(string id) { var ids = id.Split("tire"); var userId = ids[0]; var dogId = Guid.Parse(ids[1]); var messages = this.context.Messages.Where(m => m.SubjectId == dogId && m.SenderId == userId && m.ReceiverId == userManager.GetUserId(User) || m.SubjectId == dogId && m.ReceiverId == userId && m.SenderId == userManager.GetUserId(User)) .Include(m => m.Sender) .Include(m => m.Receiver) .Include(m => m.Subject) .ToList(); var dog = this.context.Dogs.Include(d => d.Images).Single(d => d.Id == dogId); var oldMessages = new List <MessageViewModel>(); foreach (var mess in messages) { oldMessages.Add(new MessageViewModel { Id = mess.Id, SenderId = mess.SenderId, SenderImageUrl = mess.Sender.ImageUrl, ReceiverId = mess.ReceiverId, ReceiverImageUrl = mess.Receiver.ImageUrl, CreatedOn = mess.CreatedOn, SubjectId = mess.SubjectId, Content = mess.Content }); } var result = new MessageListViewModel { OldMessages = oldMessages, DogImageUrl = dog.Images.First().ImageUrl, DogName = dog.Name, DogOwnerId = dog.OwnerId, Id = id, Adopted = dog.Adopted }; return(View(result)); }
public void TestInitialize() { windowManager = Substitute.For <WindowManagerEx>(); endpointExplorer = Substitute.For <EndpointExplorerViewModel>(); messageList = Substitute.For <MessageListViewModel>(); licenseStatusBar = Substitute.For <LicenseStatusBar>(); statusbarManager = new StatusBarManager(licenseStatusBar); eventAggregator = Substitute.For <IEventAggregator>(); workNotifier = Substitute.For <IWorkNotifier>(); messageFlow = Substitute.For <MessageFlowViewModel>(); sagaWindow = Substitute.For <SagaWindowViewModel>(); messageBodyView = Substitute.For <MessageBodyViewModel>(); messageProperties = Substitute.For <MessagePropertiesViewModel>(); view = Substitute.For <IShellViewStub>(); headerView = Substitute.For <MessageHeadersViewModel>(); sequenceDiagramView = Substitute.For <SequenceDiagramViewModel>(); settingsProvider = Substitute.For <ISettingsProvider>(); licenseManager = Substitute.For <AppLicenseManager>(); logWindow = Substitute.For <LogWindowViewModel>(); settingsProvider.GetSettings <ProfilerSettings>().Returns(DefaultAppSetting()); app = Substitute.For <IAppCommands>(); commandLineArgParser = MockEmptyStartupOptions(); shell = new ShellViewModel( app, windowManager, endpointExplorer, messageList, () => Substitute.For <ServiceControlConnectionViewModel>(), () => Substitute.For <LicenseMessageBoxViewModel>(), statusbarManager, eventAggregator, workNotifier, licenseManager, messageFlow, sagaWindow, messageBodyView, headerView, sequenceDiagramView, settingsProvider, messageProperties, logWindow, commandLineArgParser); ((IViewAware)shell).AttachView(view); }
public void OpenMessages() { MessageListViewModel messageViewModel; if (ItemSelected.ChatId == null) { messageViewModel = new MessageListViewModel(_vkApi, false, (int)ItemSelected.UserId); } else { messageViewModel = new MessageListViewModel(_vkApi, true, (int)ItemSelected.ChatId); } messageViewModel.Title = ItemSelected.Title; MainViewModel.This.ViewModels.Add(messageViewModel); MainViewModel.This.ActiveViewModel = MainViewModel.This.ViewModels.Last(); }
public void TestInitialize() { windowManager = Substitute.For<WindowManagerEx>(); endpointExplorer = Substitute.For<EndpointExplorerViewModel>(); messageList = Substitute.For<MessageListViewModel>(); statusbarManager = Substitute.For<StatusBarManager>(); eventAggregator = Substitute.For<IEventAggregator>(); workNotifier = Substitute.For<IWorkNotifier>(); messageFlow = Substitute.For<MessageFlowViewModel>(); sagaWindow = Substitute.For<SagaWindowViewModel>(); messageBodyView = Substitute.For<MessageBodyViewModel>(); messageProperties = Substitute.For<MessagePropertiesViewModel>(); view = Substitute.For<IShellViewStub>(); headerView = Substitute.For<MessageHeadersViewModel>(); sequenceDiagramView = Substitute.For<SequenceDiagramViewModel>(); settingsProvider = Substitute.For<ISettingsProvider>(); licenseManager = Substitute.For<AppLicenseManager>(); logWindow = Substitute.For<LogWindowViewModel>(); settingsProvider.GetSettings<ProfilerSettings>().Returns(DefaultAppSetting()); app = Substitute.For<IAppCommands>(); commandLineArgParser = MockEmptyStartupOptions(); shell = new ShellViewModel( app, windowManager, endpointExplorer, messageList, () => Substitute.For<ServiceControlConnectionViewModel>(), () => Substitute.For<LicenseRegistrationViewModel>(), statusbarManager, eventAggregator, workNotifier, licenseManager, messageFlow, sagaWindow, messageBodyView, headerView, sequenceDiagramView, settingsProvider, messageProperties, logWindow, commandLineArgParser); ((IViewAware)shell).AttachView(view); }
// GET: Messages public async Task <ViewResult> ListMessage(int page = 1) { PagingInfo pagingInfo = new PagingInfo() { CurrentPage = page, ItemsPerPage = PageSize, }; MessageListViewModel model = new MessageListViewModel(); pagingInfo.TotalItems = await _blMessanger.GetCountMessages(); model.PagingInfo = pagingInfo; model.Messages = await _blMessanger.GetMessagesByPage(page, PageSize); return(View(model)); }
public void TestInitialize() { EventAggregator = Substitute.For <IEventAggregator>(); ServiceControl = Substitute.For <IServiceControl>(); MessageStore = new Dictionary <Queue, List <MessageInfo> >(); QueueManager = new FakeQueueManager(MessageStore); WindowManager = Substitute.For <IWindowManagerEx>(); SearchBar = Substitute.For <ISearchBarViewModel>(); StatusBarManager = Substitute.For <IStatusBarManager>(); View = Substitute.For <IMessageListView>(); MessageList = new MessageListViewModel(EventAggregator, WindowManager, ServiceControl, QueueManager, SearchBar, Substitute.For <IErrorHeaderViewModel>(), Substitute.For <IGeneralHeaderViewModel>(), Substitute.For <IClipboard>(), StatusBarManager); MessageList.AttachView(View, null); }
public void TestInitialize() { WindowManager = Substitute.For <WindowManagerEx>(); EndpointExplorer = Substitute.For <EndpointExplorerViewModel>(); MessageList = Substitute.For <MessageListViewModel>(); StatusbarManager = Substitute.For <StatusBarManager>(); EventAggregator = Substitute.For <IEventAggregator>(); MessageFlow = Substitute.For <MessageFlowViewModel>(); SagaWindow = Substitute.For <SagaWindowViewModel>(); MessageBodyView = Substitute.For <MessageBodyViewModel>(); MessageProperties = Substitute.For <MessagePropertiesViewModel>(); View = Substitute.For <IShellViewStub>(); HeaderView = Substitute.For <MessageHeadersViewModel>(); SequenceDiagramView = Substitute.For <SequenceDiagramViewModel>(); SettingsProvider = Substitute.For <ISettingsProvider>(); LicenseManager = Substitute.For <AppLicenseManager>(); LogWindow = Substitute.For <LogWindowViewModel>(); SettingsProvider.GetSettings <ProfilerSettings>().Returns(DefaultAppSetting()); App = Substitute.For <IAppCommands>(); CommandLineArgParser = MockEmptyStartupOptions(); shell = new ShellViewModel( App, WindowManager, EndpointExplorer, MessageList, () => Substitute.For <ServiceControlConnectionViewModel>(), () => Substitute.For <LicenseRegistrationViewModel>(), StatusbarManager, EventAggregator, LicenseManager, MessageFlow, SagaWindow, MessageBodyView, HeaderView, SequenceDiagramView, SettingsProvider, MessageProperties, LogWindow, CommandLineArgParser); ((IViewAware)shell).AttachView(View); }
// GET: Public/MessageList public ActionResult MessageList(int type, int page = 1) { int compnayId = Convert.ToInt32(Session["ID"]); if (compnayId != 0) { ViewBag.LoginID = compnayId; } else { ViewBag.LoginID = ""; } Models.MessageListViewModel viewModel = new MessageListViewModel(); IEnumerable <Requirement> requirement = null; requirement = requirementDAL.GetPersonList(string.Format("b.JobCategory='{0}' AND b.IsDelete = 1 ORDER BY b.PublishTime DESC", type)).AsQueryable(); viewModel.Requirement = requirement.ToPagedList(page, 15); return(View(viewModel)); }
public void PostingAMessageShouldRunCorrectly() { var faker = new User { Email = "*****@*****.**", ImageUrl = "fakeimage" }; this.context.Users.Add(faker); this.context.SaveChanges(); var fakeDog = new Dog { Name = "Kalin", OwnerId = this.context.Users.First(u => u.Email == "*****@*****.**").Id }; this.context.Dogs.Add(fakeDog); this.context.SaveChanges(); var id = faker.Id + "tire" + fakeDog.Id; var messageToSend = new MessageListViewModel { Content = "zdr ko pr", Id = id }; var res = this.mController.About(messageToSend, id).Result; var result = res as RedirectToActionResult; Assert.AreEqual("About", result.ActionName); Assert.IsTrue(this.context.Messages.Any(m => m.Content == "zdr ko pr" && m.Sender.Email == "*****@*****.**" && m.Subject == fakeDog && m.Receiver == faker)); Assert.AreEqual(1, this.context.Messages.Where(m => m.Content == "zdr ko pr").Count()); }
/// <summary> /// filter by filter model /// </summary> /// <param name="filter"></param> /// <returns></returns> private MessageListViewModel DoFilter(MessageFilterViewModel filter) { var client = AutofactHelper.GetClient <IIMAPClient>(); var model = new MessageListViewModel { Items = client.GetMails(filter.Mailbox, filter.LastDate, filter.Keyword).Select(s => new MessageViewModel { UId = s.UId, Date = s.Mail.Date().ToEmailDate(), Readed = s.IsSeen, From = s.Mail.From.DisplayName, Subject = String.IsNullOrWhiteSpace(s.Mail.Subject) ? IMAPConfig.NO_SUBJECT_TEXT : s.Mail.Subject }), Filter = filter }; Logger.InfoFormat("Filter {0} messages", model.Items.Count()); return(model); }
public SequenceDiagramViewModel( IClipboard clipboard, IEventAggregator eventAggregator, IWindowManagerEx windowManager, IServiceControl serviceControl, Func <ExceptionDetailViewModel> exceptionDetailViewModel, SearchBarViewModel searchBar, EndpointExplorerViewModel endpointExplorer, MessageListViewModel messageList) { this.windowManager = windowManager; this.eventAggregator = eventAggregator; this.serviceControl = serviceControl; this.exceptionDetailViewModel = exceptionDetailViewModel; CopyConversationIDCommand = new CopyConversationIDCommand(clipboard); CopyMessageURICommand = new CopyMessageURICommand(clipboard, serviceControl); RetryMessageCommand = new RetryMessageCommand(eventAggregator, serviceControl); SearchByMessageIDCommand = new SearchByMessageIDCommand(eventAggregator, searchBar); ShowSagaCommand = new ShowSagaCommand(eventAggregator, endpointExplorer, messageList); }
public PartialViewResult ListGetPage(long?holderId, string name, string mobile, DateTime?startTime, DateTime?endTime, int pageIndex = 1) { MessageListViewModel model = new MessageListViewModel(); MessageSearchResult result = messageService.GetPageList(holderId, name, mobile, startTime, endTime, pageIndex, pageSize); model.Messages = result.Messages; //分页 Pagination pager = new Pagination(); pager.PageIndex = pageIndex; pager.PageSize = pageSize; pager.TotalCount = result.TotalCount; if (result.TotalCount <= pageSize) { model.Page = ""; } else { model.Page = pager.GetPagerHtml(); } return(PartialView("MessageListPaging", model)); }
public ShellViewModel( IAppCommands appCommander, IWindowManagerEx windowManager, EndpointExplorerViewModel endpointExplorer, MessageListViewModel messages, Func <ServiceControlConnectionViewModel> serviceControlConnection, Func <LicenseRegistrationViewModel> licenceRegistration, StatusBarManager statusBarManager, IEventAggregator eventAggregator, AppLicenseManager licenseManager, MessageFlowViewModel messageFlow, SagaWindowViewModel sagaWindow, MessageBodyViewModel messageBodyViewer, MessageHeadersViewModel messageHeadersViewer, SequenceDiagramViewModel sequenceDiagramViewer, ISettingsProvider settingsProvider, MessagePropertiesViewModel messageProperties, LogWindowViewModel logWindow, CommandLineArgParser comandLineArgParser) { this.appCommander = appCommander; this.windowManager = windowManager; this.eventAggregator = eventAggregator; this.licenseManager = licenseManager; this.settingsProvider = settingsProvider; this.comandLineArgParser = comandLineArgParser; this.serviceControlConnection = serviceControlConnection; this.licenceRegistration = licenceRegistration; MessageProperties = messageProperties; MessageFlow = messageFlow; SagaWindow = sagaWindow; StatusBarManager = statusBarManager; EndpointExplorer = endpointExplorer; MessageHeaders = messageHeadersViewer; MessageBody = messageBodyViewer; SequenceDiagram = sequenceDiagramViewer; Messages = messages; LogWindow = logWindow; Items.Add(endpointExplorer); Items.Add(messages); Items.Add(messageHeadersViewer); Items.Add(messageBodyViewer); Items.Add(messageFlow); InitializeAutoRefreshTimer(); InitializeIdleTimer(); ShutDownCommand = this.CreateCommand(() => this.appCommander.ShutdownImmediately()); AboutCommand = this.CreateCommand(() => this.windowManager.ShowDialog <AboutViewModel>()); HelpCommand = this.CreateCommand(() => Process.Start(@"http://docs.particular.net/")); ConnectToServiceControlCommand = this.CreateCommand(ConnectToServiceControl, vm => vm.CanConnectToServiceControl); RefreshAllCommand = this.CreateCommand(RefreshAll); RegisterCommand = this.CreateCommand(() => { this.windowManager.ShowDialog <LicenseRegistrationViewModel>(); DisplayRegistrationStatus(); }); ResetLayoutCommand = this.CreateCommand(() => View.OnResetLayout(settingsProvider)); OptionsCommand = this.CreateCommand(() => windowManager.ShowDialog <OptionsViewModel>()); }
public ShowSagaCommand(IEventAggregator eventAggregator, EndpointExplorerViewModel endpointExplorer, MessageListViewModel messageList) { this.messageList = messageList; this.endpointExplorer = endpointExplorer; this.eventAggregator = eventAggregator; }
public ActionResult Messages(int roomID) { var messageListViewModel = new MessageListViewModel(reader.GetRoomMessages(roomID)); return(View(messageListViewModel)); }
public void TestInitialize() { WindowManager = Substitute.For<WindowManagerEx>(); EndpointExplorer = Substitute.For<EndpointExplorerViewModel>(); MessageList = Substitute.For<MessageListViewModel>(); StatusbarManager = Substitute.For<StatusBarManager>(); EventAggregator = Substitute.For<IEventAggregator>(); MessageFlow = Substitute.For<MessageFlowViewModel>(); SagaWindow = Substitute.For<SagaWindowViewModel>(); MessageBodyView = Substitute.For<MessageBodyViewModel>(); MessageProperties = Substitute.For<MessagePropertiesViewModel>(); View = Substitute.For<IShellViewStub>(); HeaderView = Substitute.For<MessageHeadersViewModel>(); SequenceDiagramView = Substitute.For<SequenceDiagramViewModel>(); SettingsProvider = Substitute.For<ISettingsProvider>(); LicenseManager = Substitute.For<AppLicenseManager>(); LogWindow = Substitute.For<LogWindowViewModel>(); SettingsProvider.GetSettings<ProfilerSettings>().Returns(DefaultAppSetting()); App = Substitute.For<IAppCommands>(); CommandLineArgParser = MockEmptyStartupOptions(); shell = new ShellViewModel( App, WindowManager, EndpointExplorer, MessageList, () => Substitute.For<ServiceControlConnectionViewModel>(), () => Substitute.For<LicenseRegistrationViewModel>(), StatusbarManager, EventAggregator, LicenseManager, MessageFlow, SagaWindow, MessageBodyView, HeaderView, SequenceDiagramView, SettingsProvider, MessageProperties, LogWindow, CommandLineArgParser); ((IViewAware)shell).AttachView(View); }