public void TestInitialize() { notificationProviderMock = new NotificationProviderMock(); NotificationMessageProvider.Initialize(notificationProviderMock, 1000000); mock = new ApiConnectorMock(); dialogProviderMock = new DialogProviderMock(); deleteCommand = new EntityDeleteCommand <Card>(mock) { Entity = card }; ModalDialogManager.Initialize(dialogProviderMock); }
public void ShowDialogTest() { DialogProviderMock mock = new DialogProviderMock(); Action <DialogResult> callback = result => { }; ModalDialogManager.Initialize(mock); ModalDialogManager.ShowDialog("title", "text", DialogButtons.OkayCancel, callback); Assert.AreEqual("title", mock.Title); Assert.AreEqual("text", mock.Text); Assert.AreEqual(DialogButtons.OkayCancel, mock.Buttons); Assert.AreSame(callback, mock.Callback); }