Exemplo n.º 1
0
        public void IsMatchCombinations(bool expectedMatch, bool state)
        {
            Filter <object>    filter     = state ? (Filter <object>) new AnyFilter <object>() : new NoneFilter <object>();
            NotFilter <object> combinator = new NotFilter <object>(filter);

            Assert.AreEqual(expectedMatch, combinator.IsMatch(null));
        }
Exemplo n.º 2
0
        public void IsMatchTest()
        {
            NotFilter     target  = new NotFilter(); // TODO: Eseguire l'inizializzazione a un valore appropriato
            SyslogMessage message = new SyslogMessage(null, "logbus.dis.unina.it", SyslogFacility.Kernel,
                                                      SyslogSeverity.Info, "Hello people!");

            target.filter = new FacilityEqualsFilter {
                facility = SyslogFacility.Kernel
            };
            bool expected = false;
            bool actual   = target.IsMatch(message);

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
 public void IsMatchCombinations(bool expectedMatch, bool state)
 {
     Filter<object> filter = state ? (Filter<object>)new AnyFilter<object>() : new NoneFilter<object>();
     NotFilter<object> combinator = new NotFilter<object>(filter);
     Assert.AreEqual(expectedMatch, combinator.IsMatch(null));
 }