示例#1
0
    public void AddChild(IsNotDefinedFilter filter)
    {
      if (child != null)
        throw new InvalidFilterException("only one child allowed");

      child = filter;
    }
示例#2
0
    public void AddChild(IsNotDefinedFilter filter)
    {
      if (children.Any()) 
        throw new InvalidFilterException("IsNotDefinedFilter cannot have siblings");

      children.Add(filter);
    }
示例#3
0
    public void TestIsNotDefinedFilter()
    {
      var uut = new IsNotDefinedFilter();
      var xmlDoc = new XmlDocument();
      xmlDoc.LoadXml(AddNamespace(uut.ToXml()));

      Assert.AreEqual(1, xmlDoc.GetElementsByTagName("C:is-not-defined").Count);
    }