Esempio n. 1
0
        /// <summary>
        /// Validates the settings for an InProcessApplication.
        /// </summary>
        /// <param name="settings">The settings to validate.</param>
        private void ValidateApplicationSettings(InProcessApplicationSettings settings)
        {
            if (settings.ApplicationImplementationFactory == null)
            {
                throw new InvalidOperationException("ApplicationImplementationFactory must be specified.");
            }

            if (string.IsNullOrEmpty(settings.Path))
            {
                throw new InvalidOperationException("For InProc scenarios, Path cannot be null or empty.");
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of an InProcessApplication.
 /// </summary>
 /// <param name="settings">The settings used to start the test application.</param>
 public InProcessApplication(InProcessApplicationSettings settings)
 {
     ValidateApplicationSettings(settings);
     ApplicationSettings = settings;
 }