public PesterConfiguration()
 {
     Run          = new RunConfiguration();
     Filter       = new FilterConfiguration();
     CodeCoverage = new CodeCoverageConfiguration();
     TestResult   = new TestResultConfiguration();
     Should       = new ShouldConfiguration();
     Debug        = new DebugConfiguration();
     Output       = new OutputConfiguration();
     TestDrive    = new TestDriveConfiguration();
     TestRegistry = new TestRegistryConfiguration();
 }
 public PesterConfiguration(IDictionary configuration)
 {
     if (configuration != null)
     {
         Run          = new RunConfiguration(configuration.GetIDictionaryOrNull(nameof(Run)));
         Filter       = new FilterConfiguration(configuration.GetIDictionaryOrNull(nameof(Filter)));
         CodeCoverage = new CodeCoverageConfiguration(configuration.GetIDictionaryOrNull(nameof(CodeCoverage)));
         TestResult   = new TestResultConfiguration(configuration.GetIDictionaryOrNull(nameof(TestResult)));
         Should       = new ShouldConfiguration(configuration.GetIDictionaryOrNull(nameof(Should)));
         Debug        = new DebugConfiguration(configuration.GetIDictionaryOrNull(nameof(Debug)));
         Output       = new OutputConfiguration(configuration.GetIDictionaryOrNull(nameof(Output)));
         TestDrive    = new TestDriveConfiguration(configuration.GetIDictionaryOrNull(nameof(TestDrive)));
         TestRegistry = new TestRegistryConfiguration(configuration.GetIDictionaryOrNull(nameof(TestRegistry)));
     }
 }
    public static PesterConfiguration ShallowClone(PesterConfiguration configuration)
    {
        var cfg = Default;

        cfg.Run          = RunConfiguration.ShallowClone(configuration.Run);
        cfg.Filter       = FilterConfiguration.ShallowClone(configuration.Filter);
        cfg.CodeCoverage = CodeCoverageConfiguration.ShallowClone(configuration.CodeCoverage);
        cfg.TestResult   = TestResultConfiguration.ShallowClone(configuration.TestResult);
        cfg.Should       = ShouldConfiguration.ShallowClone(configuration.Should);
        cfg.Debug        = DebugConfiguration.ShallowClone(configuration.Debug);
        cfg.Output       = OutputConfiguration.ShallowClone(configuration.Output);
        cfg.TestDrive    = TestDriveConfiguration.ShallowClone(configuration.TestDrive);
        cfg.TestRegistry = TestRegistryConfiguration.ShallowClone(configuration.TestRegistry);
        return(cfg);
    }