Esempio n. 1
0
        public void ToSettings()
        {
            // Arrange
            var dialog   = new SaveFileDialog();
            var settings = new SaveFileDialogSettings();
            var sync     = new SaveFileDialogSettingsSync(dialog, settings);

            dialog.FileName    = "SomeFile.txt";
            dialog.FilterIndex = 2;

            // Act
            sync.ToSettings();

            // Assert
            Assert.That(settings.FileName, Is.EqualTo(dialog.FileName));
            Assert.That(settings.FileNames, Is.EqualTo(dialog.FileNames));
            Assert.That(settings.FilterIndex, Is.EqualTo(dialog.FilterIndex));
            Assert.That(settings.SafeFileName, Is.EqualTo(dialog.SafeFileName));
            Assert.That(settings.SafeFileNames, Is.EqualTo(dialog.SafeFileNames));
        }
Esempio n. 2
0
 public void SetUp()
 {
     dialog   = new SaveFileDialog();
     settings = new SaveFileDialogSettings();
     sync     = new SaveFileDialogSettingsSync(dialog, settings);
 }