public void OpenLocalImage_OpenDialogCorrectly() { OpenFileDialog dialog = new OpenFileDialog(); OpenImageService service = new OpenImageService(); service.OpenLocalImage(dialog); if (dialog.ShowDialog() == DialogResult.OK) { Assert.Pass(); } }
public static void OpenLocalImage(OpenFileDialog OBrwsDialog, OpenImageService service) { service.OpenLocalImage(OBrwsDialog); if (OBrwsDialog.ShowDialog() == DialogResult.OK) { path = OBrwsDialog.FileName; } else { path = null; } }