Ejemplo n.º 1
0
        public void SetFormatterTest()
        {
            FormattableLogBase target    = CreateFormattableLogBase(); // TODO: Initialize to an appropriate value
            ILogItemFormatter  formatter = null;                       // TODO: Initialize to an appropriate value

            target.SetFormatter(formatter);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Ejemplo n.º 2
0
 /// <summary> Sets a given formatter which is used to produce the output of the log. </summary>
 /// <param name="formatter"> The formatter to be used in order to create string representations of logged <see cref="LogItem" /> instances. </param>
 /// <exception cref="ArgumentNullException"> If <paramref name="formatter" /> is a null reference. </exception>
 public void SetFormatter(ILogItemFormatter formatter)
 {
     if (formatter == null)
     {
         throw new ArgumentNullException("formatter");
     }
     this.Formatter = formatter;
 }
Ejemplo n.º 3
0
        public void FormatterTest()
        {
            PrivateObject param0 = null;                                                    // TODO: Initialize to an appropriate value
            FormattableLogBase_Accessor target   = new FormattableLogBase_Accessor(param0); // TODO: Initialize to an appropriate value
            ILogItemFormatter           expected = null;                                    // TODO: Initialize to an appropriate value
            ILogItemFormatter           actual;

            target.Formatter = expected;
            actual           = target.Formatter;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
 /// <summary>
 /// Creates a named logger with a given formatter.
 /// </summary>
 /// <param name="name">The logger name.</param>
 /// <param name="formatter">The formatter to be used in order to
 /// create string representations of logged <see cref="LogItem"/>
 /// instances.</param>
 /// <exception cref="ArgumentNullException">If <paramref name="formatter"/>
 /// is a null reference.</exception>
 protected FormattableLoggerBase(string name, ILogItemFormatter formatter)
     : base(name)
 {
     Ensure.ArgumentNotNull(formatter, "formatter");
     Formatter = formatter;
 }
Ejemplo n.º 5
0
 /// <summary> Creates a named log with a given formatter. </summary>
 /// <param name="name"> The log name. </param>
 /// <param name="formatter"> The formatter to be used in order to create string representations of logged <see cref="LogItem" /> instances. </param>
 /// <exception cref="ArgumentNullException"> If <paramref name="formatter" /> is a null reference. </exception>
 protected FormattableLogBase(string name, ILogItemFormatter formatter)
     : base(name)
 {
     SetFormatter(formatter);
 }
Ejemplo n.º 6
0
 /// <summary> Creates the log with a given formatter. </summary>
 /// <param name="formatter"> The formatter to be used in order to create string representations of logged <see cref="LogItem" /> instances. </param>
 /// <exception cref="ArgumentNullException"> If <paramref name="formatter" /> is a null reference. </exception>
 protected FormattableLogBase(ILogItemFormatter formatter)
     : base()
 {
     SetFormatter(formatter);
 }