public ConfigurationValidatorTests() { modelBuilder = new ConfigurationModelBuilder <SampleConfig, SampleConfigSet>(nameof(SampleConfigSet.SampleConfig), c => c.SampleConfig); configIdentity = new ConfigurationIdentity(new ConfigurationClient("TestId"), new Version(1, 0)); service = new Mock <IConfigurationSetService>(); service.Setup(r => r.GetConfigurationSet(typeof(SampleConfigSet), It.IsAny <ConfigurationIdentity>())) .ReturnsAsync(() => new SampleConfigSet { Options = new OptionSet <OptionFromConfigSet>(OptionFromConfigSet.Options, o => o.Id.ToString(), o => o.Description) }); target = new ConfigurationValidator(new TestOptionSetFactory(), service.Object); }
public ConfigurationFloatPropertyBuilderTests() { target = new ConfigurationModelBuilder <FloatTestClass>(new ConfigurationModel(nameof(SimpleConfig), typeof(SimpleConfig))); }
public ConfigurationModelBuilderTest() { target = new ConfigurationModelBuilder <SimpleConfig, SimpleConfigSet>(new ConfigurationModel <SimpleConfig, SimpleConfigSet>(nameof(SimpleConfigSet.Config), c => c.Config, (set, c) => set.Config = c)); }
public ConfigurationIntergerPropertyDefinitionTests() { target = new ConfigurationModelBuilder <IntergerTestClass>(new ConfigurationModel(nameof(SimpleConfig), typeof(SimpleConfig))); }
public ConfigurationPropertyWithOptionFromConfigurationSetBuilderTests() { target = new ConfigurationModelBuilder <TestConfig, TestConfiguationModule>(new ConfigurationModel <TestConfig, TestConfiguationModule>(nameof(TestConfiguationModule.TestConfig), c => c.TestConfig, (set, c) => set.TestConfig = c)); configIdentity = new ConfigurationIdentity(new ConfigurationClient("TestId"), new Version(1, 0)); }
public ConfigurationDateTimePropertyBuilderTests() { target = new ConfigurationModelBuilder <DateTimeTestClass, TestConfigSet>(new ConfigurationModel <DateTimeTestClass, TestConfigSet>(nameof(TestConfigSet.DateTime), c => c.DateTime, (set, c) => set.DateTime = c)); }
public ConfigurationClassPropertyBuilderTests() { target = new ConfigurationModelBuilder <ParentTestClass, TestConfigSet>(new ConfigurationModel <ParentTestClass, TestConfigSet>(nameof(TestConfigSet.ParentClass), c => c.ParentClass, (set, c) => set.ParentClass = c)); }
public ConfigurationPropertyWithOptionBuilderTests() { target = new ConfigurationModelBuilder <PropertyWithOptionTestClass>(new ConfigurationModel(nameof(PropertyWithOptionTestClass), typeof(PropertyWithOptionTestClass))); mockServiceProvider = new Mock <IServiceProvider>(); mockServiceProvider.Setup(p => p.GetService(typeof(OptionProvider))).Returns(() => new OptionProvider()); }
public ConfigurationModelBuilderTest() { target = new ConfigurationModelBuilder <SimpleConfig>(new ConfigurationModel(nameof(SimpleConfig), typeof(SimpleConfig))); }
public ConfigurationFloatPropertyBuilderTests() { target = new ConfigurationModelBuilder <FloatTestClass, TestConfigSet>(new ConfigurationModel <FloatTestClass, TestConfigSet>(nameof(TestConfigSet.Float), c => c.Float, (set, c) => set.Float = c)); }
public ConfigurationDateTimePropertyBuilderTests() { target = new ConfigurationModelBuilder <DateTimeTestClass>(new ConfigurationModel(nameof(SimpleConfig), typeof(SimpleConfig))); }
public ConfigurationStringPropertyBuilderTests() { target = new ConfigurationModelBuilder <StringTestClass>(new ConfigurationModel(nameof(StringTestClass), typeof(StringTestClass))); }
public ConfigurationStringPropertyBuilderTests() { target = new ConfigurationModelBuilder <StringTestClass, TestConfigSet>(new ConfigurationModel <StringTestClass, TestConfigSet>(nameof(TestConfigSet.String), c => c.String, (set, c) => set.String = c)); }
public ConfigurationValidatorTests() { modelBuilder = new ConfigurationModelBuilder <SampleConfig>(nameof(SampleConfig)); target = new ConfigurationValidator(new TestOptionSetFactory()); }
public ConfigurationIntergerPropertyDefinitionTests() { target = new ConfigurationModelBuilder <IntergerTestClass, TestConfigSet>(new ConfigurationModel <IntergerTestClass, TestConfigSet>(nameof(TestConfigSet.Integer), p => p.Integer, (set, c) => set.Integer = c)); }