Пример #1
0
        public void NullPaths()
        {
            ApplianceCheck checker = new ApplianceExistsCheck(null, null,
                                                              ApplianceCheck.FileExtension.ovaovf);

            checker.Validate();
        }
        public void NullPaths()
        {
            ApplianceCheck checker = new ApplianceExistsCheck(null, null,
                                                              ApplianceCheck.FileExtension.ovaovf);

            Assert.That(() => checker.Validate(), Throws.ArgumentNullException);
        }
Пример #3
0
 public void NullPaths()
 {
     Assert.Throws(typeof(ArgumentNullException), () =>
     {
         var checker = new ApplianceExistsCheck(null, null, ApplianceCheck.FileExtension.ovaovf);
         checker.Validate();
     });
 }
Пример #4
0
        private bool CheckApplianceExists(out string error)
        {
            ApplianceCheck.FileExtension extension = m_comboBoxFormat.SelectedItem.ToString().Contains("xva")
                                                                 ? ApplianceCheck.FileExtension.xva
                                                                 : ApplianceCheck.FileExtension.ovaovf;

            ApplianceCheck check = new ApplianceExistsCheck(ApplianceDirectory, ApplianceFileName, extension);

            check.Validate();
            error = check.ErrorReason;
            return(check.IsValid);
        }