Exemple #1
0
        public void NonThreadAgnosticTest()
        {
            Layout l = new SimpleLayout("${threadname}");

            l.Initialize(null);
            Assert.False(l.ThreadAgnostic);
        }
Exemple #2
0
        public void ThreadAgnosticTest()
        {
            Layout l = new SimpleLayout("${message}");

            l.Initialize(null);
            Assert.True(l.ThreadAgnostic);
        }
Exemple #3
0
        public void TripleWrapperOverNonAgnostic()
        {
            Layout l = new SimpleLayout("${uppercase:${lowercase:${rot13:${message}${threadname}}}}");

            l.Initialize(null);
            Assert.False(l.ThreadAgnostic);
        }
Exemple #4
0
        public void TripleWrapperOverAgnostic()
        {
            Layout l = new SimpleLayout("${uppercase:${lowercase:${rot13:${message}}}}");

            l.Initialize(null);
            Assert.True(l.IsThreadAgnostic);
        }
Exemple #5
0
        public void CustomAgnosticTests()
        {
            var cif = new ConfigurationItemFactory();

            cif.RegisterType(typeof(CustomRendererAgnostic), string.Empty);

            Layout l = new SimpleLayout("${customAgnostic}", cif);

            l.Initialize(null);
            Assert.True(l.ThreadAgnostic);
        }