public void Xml_Extension_Method_Makes_Builder_Use_Xml() { var config = new ConfigurationBuilder(); config.ConfigureForHosting(x => { x.UsingAssemblyLocator<TestAssemblyLocator>(); x.UseXMLSerialization(); }); Assert.IsInstanceOf<XmlSerializer>(config.ConfigurationContext.Serializer); }
public void JsonDotNet_Extension_Method_Makes_Builder_Use_JsonDotNet() { var config = new ConfigurationBuilder(); config.ConfigureForHosting(x => { x.UsingAssemblyLocator<TestAssemblyLocator>(); x.UseJsonDotNet(); }); Assert.IsInstanceOf<JsonDotNetSerializer>(config.ConfigurationContext.Serializer); }
public static IBusHost ConfigureForHosting(Action<FluentConfigurationSource> configureFunction) { var config = new ConfigurationBuilder(); return config.ConfigureForHosting(configureFunction); }
public static IBusHost Create(Action<ConfigurationBuilder> configureFunction) { var config = new ConfigurationBuilder(); configureFunction(config); return config.ConfigureForHosting(); }
public void Default_Value_For_Serializer_Is_DefaultSerializer() { var builder = new ConfigurationBuilder(); builder.ConfigureForHosting(x => x.UsingAssemblyLocator<TestAssemblyLocator>()); Assert.That(builder.ConfigurationContext.Serializer is DefaultSerializer); }