当前位置: 首页>>代码示例>>C#>>正文


C# XMLToken.getName方法代码示例

本文整理汇总了C#中libsbmlcs.XMLToken.getName方法的典型用法代码示例。如果您正苦于以下问题:C# XMLToken.getName方法的具体用法?C# XMLToken.getName怎么用?C# XMLToken.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在libsbmlcs.XMLToken的用法示例。


在下文中一共展示了XMLToken.getName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: test_XMLToken_newSetters_setTriple1

 public void test_XMLToken_newSetters_setTriple1()
 {
     XMLTriple triple = new  XMLTriple("test","","");
       XMLToken token = new  XMLToken();
       int i = token.setTriple(triple);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue((  "test" == token.getName() ));
       triple = null;
       token = null;
 }
开发者ID:yarden,项目名称:roadrunner,代码行数:10,代码来源:TestXMLToken_newSetters.cs

示例2: test_Token_copyConstructor

 public void test_Token_copyConstructor()
 {
     XMLTriple t = new XMLTriple("sarah", "http://foo.org/", "bar");
       XMLToken token = new XMLToken(t,3,4);
       assertTrue( token.getName() ==  "sarah" );
       assertTrue( token.getURI() ==  "http://foo.org/" );
       assertTrue( token.getPrefix() ==  "bar" );
       assertTrue( token.isEnd() == true );
       assertTrue( token.isEOF() == false );
       assertTrue( token.getLine() == 3 );
       assertTrue( token.getColumn() == 4 );
       XMLToken token2 = new XMLToken(token);
       assertTrue( token2.getName() ==  "sarah" );
       assertTrue( token2.getURI() ==  "http://foo.org/" );
       assertTrue( token2.getPrefix() ==  "bar" );
       assertTrue( token2.isEnd() == true );
       assertTrue( token2.isEOF() == false );
       assertTrue( token2.getLine() == 3 );
       assertTrue( token2.getColumn() == 4 );
       t = null;
       token = null;
       token2 = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:23,代码来源:TestCopyAndClone.cs

示例3: test_XMLToken_create

 public void test_XMLToken_create()
 {
     XMLToken token;
       XMLTriple triple;
       XMLAttributes attr;
       token = new  XMLToken();
       assertTrue( token != null );
       token = null;
       triple = new  XMLTriple("attr", "uri", "prefix");
       token = new  XMLToken(triple);
       assertTrue( token != null );
       assertTrue( (  "attr" != token.getName() ) == false );
       assertTrue( (  "prefix" != token.getPrefix() ) == false );
       assertTrue( (  "uri" != token.getURI() ) == false );
       token = null;
       attr = new  XMLAttributes();
       assertTrue( attr != null );
       attr.add( "attr2", "value");
       token = new  XMLToken(triple,attr);
       assertTrue( token != null );
       XMLAttributes returnattr = token.getAttributes();
       assertTrue( (  "attr2" != returnattr.getName(0) ) == false );
       token = null;
       triple = null;
       attr = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:26,代码来源:TestXMLToken.cs

示例4: test_XMLToken_fields

 public void test_XMLToken_fields()
 {
     XMLTriple triple;
       XMLToken token;
       triple = new  XMLTriple("attr", "uri", "prefix");
       token = new  XMLToken(triple);
       assertTrue( token.isElement() == true );
       assertTrue( token.isEnd() == true );
       assertTrue( token.isStart() == false );
       assertTrue( token.isText() == false );
       assertTrue( token.isEOF() == false );
       assertTrue( (  "attr" != token.getName() ) == false );
       assertTrue( (  "uri" != token.getURI() ) == false );
       assertTrue( (  "prefix" != token.getPrefix() ) == false );
       token = null;
       triple = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:17,代码来源:TestXMLToken.cs

示例5: test_XMLToken_attribute_set_clear

 public void test_XMLToken_attribute_set_clear()
 {
     XMLTriple triple = new  XMLTriple("test","","");
       XMLAttributes attr = new  XMLAttributes();
       XMLToken token = new  XMLToken(triple,attr);
       XMLAttributes nattr = new  XMLAttributes();
       XMLTriple xt1 = new  XMLTriple("name1", "http://name1.org/", "p1");
       XMLTriple xt2 = new  XMLTriple("name2", "http://name2.org/", "p2");
       XMLTriple xt3 = new  XMLTriple("name3", "http://name3.org/", "p3");
       XMLTriple xt4 = new  XMLTriple("name4", "http://name4.org/", "p4");
       XMLTriple xt5 = new  XMLTriple("name5", "http://name5.org/", "p5");
       nattr.add(xt1, "val1");
       nattr.add(xt2, "val2");
       nattr.add(xt3, "val3");
       nattr.add(xt4, "val4");
       nattr.add(xt5, "val5");
       token.setAttributes(nattr);
       assertTrue( token.getAttributesLength() == 5 );
       assertTrue( token.isAttributesEmpty() == false );
       assertTrue( (  "name1" != token.getAttrName(0) ) == false );
       assertTrue( (  "val1"  != token.getAttrValue(0) ) == false );
       assertTrue( (  "http://name1.org/" != token.getAttrURI(0) ) == false );
       assertTrue( (  "p1"    != token.getAttrPrefix(0) ) == false );
       assertTrue( (  "name2" != token.getAttrName(1) ) == false );
       assertTrue( (  "val2"  != token.getAttrValue(1) ) == false );
       assertTrue( (  "http://name2.org/" != token.getAttrURI(1) ) == false );
       assertTrue( (  "p2"    != token.getAttrPrefix(1) ) == false );
       assertTrue( (  "name3" != token.getAttrName(2) ) == false );
       assertTrue( (  "val3"  != token.getAttrValue(2) ) == false );
       assertTrue( (  "http://name3.org/" != token.getAttrURI(2) ) == false );
       assertTrue( (  "p3"    != token.getAttrPrefix(2) ) == false );
       assertTrue( (  "name4" != token.getAttrName(3) ) == false );
       assertTrue( (  "val4"  != token.getAttrValue(3) ) == false );
       assertTrue( (  "http://name4.org/" != token.getAttrURI(3) ) == false );
       assertTrue( (  "p4"    != token.getAttrPrefix(3) ) == false );
       assertTrue( (  "name5" != token.getAttrName(4) ) == false );
       assertTrue( (  "val5"  != token.getAttrValue(4) ) == false );
       assertTrue( (  "http://name5.org/" != token.getAttrURI(4) ) == false );
       assertTrue( (  "p5"    != token.getAttrPrefix(4) ) == false );
       XMLTriple ntriple = new  XMLTriple("test2","http://test2.org/","p2");
       token.setTriple(ntriple);
       assertTrue( (    "test2" != token.getName() ) == false );
       assertTrue( (     "http://test2.org/" != token.getURI() ) == false );
       assertTrue( (  "p2" != token.getPrefix() ) == false );
       token.clearAttributes();
       assertTrue( token.getAttributesLength() == 0 );
       assertTrue( token.isAttributesEmpty() != false );
       nattr = null;
       triple = null;
       ntriple = null;
       attr = null;
       token = null;
       xt1 = null;
       xt2 = null;
       xt3 = null;
       xt4 = null;
       xt5 = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:58,代码来源:TestXMLToken.cs


注:本文中的libsbmlcs.XMLToken.getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。