public void CanCreateFormatterFromFactoryFromGivenConfiguration()
        {
            FormatterData data = new BinaryLogFormatterData("ignore");
            DictionaryConfigurationSource configurationSource = new DictionaryConfigurationSource();

            ILogFormatter formatter = LogFormatterCustomFactory.Instance.Create(context, data, configurationSource, reflectionCache);

            Assert.IsNotNull(formatter);
            Assert.AreEqual(formatter.GetType(), typeof(BinaryLogFormatter));
        }
		public void CanCreatePoliciesForBinaryLogFormatter()
		{
			FormatterData data = new BinaryLogFormatterData("name");
			loggingSettings.Formatters.Add(data);

		    using (var container = CreateContainer())
		    {
		        BinaryLogFormatter createdObject = (BinaryLogFormatter)container.Resolve<ILogFormatter>("name");

		        Assert.IsNotNull(createdObject);
		    }
		}
        public void CanCreateFormatterFromContainerFromGivenName()
        {
            FormatterData data = new BinaryLogFormatterData("ignore");
            LoggingSettings settings = new LoggingSettings();
            settings.Formatters.Add(data);
            DictionaryConfigurationSource configurationSource = new DictionaryConfigurationSource();
            configurationSource.Add(LoggingSettings.SectionName, settings);

            ILogFormatter formatter = GetFormatter("ignore", configurationSource);

            Assert.IsNotNull(formatter);
            Assert.AreEqual(formatter.GetType(), typeof(BinaryLogFormatter));
        }
		public void CanCreateFormatterFromFactoryFromGivenName()
		{
			FormatterData data = new BinaryLogFormatterData("ignore");
			LoggingSettings settings = new LoggingSettings();
			settings.Formatters.Add(data);
			DictionaryConfigurationSource configurationSource = new DictionaryConfigurationSource();
			configurationSource.Add(LoggingSettings.SectionName, settings);

			ILogFormatter formatter = LogFormatterCustomFactory.Instance.Create(context, "ignore", configurationSource, reflectionCache);

			Assert.IsNotNull(formatter);
			Assert.AreEqual(formatter.GetType(), typeof(BinaryLogFormatter));
		}
 internal BinaryFormatterBuilder(string formatterName)
 {
     formatterData = new BinaryLogFormatterData(formatterName);
 }
 public void Given()
 {
     this.formatterData = new BinaryLogFormatterData("formatterName");
 }
 public void Given()
 {
     var formatterData = new BinaryLogFormatterData("formatterName");
     registration = formatterData.GetRegistrations().First();
 }