Example #1
0
        public FactoryTests()
        {
            // You need to remember to remove the ".config" in the filename for it to work correctly.
            // The ConfigurationManager tacks on a trailing ".config" to the filename.
            // C:\VSProjects\MvcInstaller\RuleValidationFactory.Tests\bin\Debug\RuleValidationFactory.Tests.dll.config.config
            // So if the actual filename is "RuleValidationFactory.Tests.dll.config",
            // then you have to enter, RuleValidationFactory.Tests.dll for it to work.
            _configSection = ConfigurationManager.OpenExeConfiguration(AppDomain.CurrentDomain.BaseDirectory + @"\RuleValidationFactory.Tests.dll");

            _config = Serializer <InstallerConfig> .Deserialize(AppDomain.CurrentDomain.BaseDirectory + @"\installer.config");

            _factory = new RulesValidationFactory(_config, _configSection);
        }
Example #2
0
        public FactoryTests()
        {
            // You need to remember to remove the ".config" in the filename for it to work correctly.
            // The ConfigurationManager tacks on a trailing ".config" to the filename.
            // C:\VSProjects\MvcInstaller\RuleValidationFactory.Tests\bin\Debug\RuleValidationFactory.Tests.dll.config.config
            // So if the actual filename is "RuleValidationFactory.Tests.dll.config",
            // then you have to enter, RuleValidationFactory.Tests.dll for it to work.
            _configSection = ConfigurationManager.OpenExeConfiguration(AppDomain.CurrentDomain.BaseDirectory + @"\RuleValidationFactory.Tests.dll");

            _config = Serializer<InstallerConfig>.Deserialize(AppDomain.CurrentDomain.BaseDirectory + @"\installer.config");

            _factory = new RulesValidationFactory(_config, _configSection);
        }