示例#1
0
 public void TestValueSeparator() {
     _node = new AttributeNode( "a" );
     _node.ValueSeparator = ",";
     _node.Add( "1" );
     _node.Add( "2" );
     Assert.AreEqual( "a=\"1,2\"", _node.GetResult() );
 }
示例#2
0
 /// <summary>
 /// 添加节点
 /// </summary>
 private void AddNode( string name, string value, string separator, string quotes ) {
     var node = new AttributeNode( name ) { ValueSeparator = separator, AttributeSeparator = _attributeSeparator, ValueQuotes = quotes };
     node.Add( value );
     _nodes.Add( name, node );
 }
示例#3
0
 public void TestValueQuotes() {
     _node = new AttributeNode( "a" );
     _node.ValueQuotes = "'";
     _node.Add( "1" );
     Assert.AreEqual( "a='1'", _node.GetResult() );
 }
示例#4
0
 public void TestAttributeSeparator() {
     _node = new AttributeNode( "a" );
     _node.AttributeSeparator = "|";
     _node.Add( "1" );
     Assert.AreEqual( "a|\"1\"", _node.GetResult() );
 }
示例#5
0
 public void TestInit() {
     _node = new AttributeNode("a");
 }