public void PromptUser(ICommonWindowContent <ICloseSource> content) { var dialog = new CommonDialogWindow <ICloseSource>(content); dialog.Activated += OnUserPromptActiviated; dialog.ShowModal(); dialog.Activated -= OnUserPromptActiviated; }
public TResult PromptUser <TResult>(ICommonWindowContent <IViewModelBase <TResult> > content) { var dialog = new CommonDialogWindow <IViewModelBase <TResult> >(content); dialog.Activated += OnUserPromptActiviated; dialog.ShowModal(); dialog.Activated -= OnUserPromptActiviated; return(dialog.ViewModel.Result); }
public void BeforeEach() { _contentMock = new Mock <ICommonWindowContent <ICloseSource> > { DefaultValueProvider = DefaultValueProvider.Mock }; _contentMock.Setup(c => c.Title).Returns("Default Title"); _objectUnderTest = new CommonDialogWindow <ICloseSource>(_contentMock.Object); }
public void TestConstructor_SetsTitle() { const string expectedTitle = "Expected Title"; _contentMock.Setup(c => c.Title).Returns(expectedTitle); _objectUnderTest = new CommonDialogWindow <ICloseSource>(_contentMock.Object); Assert.AreEqual(expectedTitle, _objectUnderTest.Title); }