Exemplo n.º 1
0
        public void NonThreadAgnosticTest()
        {
            Layout l = new SimpleLayout("${threadname}");

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

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

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

            l.Initialize(null);
            Assert.True(l.IsThreadAgnostic);
        }
Exemplo n.º 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);
        }