public void TestValueSeparator() { _node = new AttributeNode( "a" ); _node.ValueSeparator = ","; _node.Add( "1" ); _node.Add( "2" ); Assert.AreEqual( "a=\"1,2\"", _node.GetResult() ); }
/// <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 ); }
public void TestValueQuotes() { _node = new AttributeNode( "a" ); _node.ValueQuotes = "'"; _node.Add( "1" ); Assert.AreEqual( "a='1'", _node.GetResult() ); }
public void TestAttributeSeparator() { _node = new AttributeNode( "a" ); _node.AttributeSeparator = "|"; _node.Add( "1" ); Assert.AreEqual( "a|\"1\"", _node.GetResult() ); }
public void TestInit() { _node = new AttributeNode("a"); }