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


C# Model.setNotes方法代码示例

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


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

示例1: test_SBase_setNotesString_l3_addMarkup

 public void test_SBase_setNotesString_l3_addMarkup()
 {
     SBase c = new Model(3, 1);
       string notes = "This is a test note";
       string taggednotes = "<notes>\n" + "  <p xmlns=\"http://www.w3.org/1999/xhtml\">This is a test note</p>\n" + "</notes>";
       c.setNotes(notes, true);
       assertTrue(c.isSetNotes() == true);
       if ((taggednotes != c.getNotesString()))
     ;
       {
       }
       XMLNode t1 = c.getNotes();
       assertTrue(t1.getNumChildren() == 1);
       XMLNode t2 = t1.getChild(0);
       assertTrue(t2.getNumChildren() == 1);
       XMLNode t3 = t2.getChild(0);
       assertTrue(("This is a test note" == t3.getCharacters()));
       c.setNotes(c.getNotesString(), true);
       t1 = c.getNotes();
       assertTrue(t1.getNumChildren() == 1);
       string chars = c.getNotesString();
       assertTrue((taggednotes == chars));
       c.setNotes("", true);
       assertTrue(c.isSetNotes() == false);
       if (c.getNotesString() != null)
     ;
       {
       }
       c.setNotes(taggednotes, true);
       assertTrue(c.isSetNotes() == true);
       if ((taggednotes != c.getNotesString()))
     ;
       {
       }
       t1 = c.getNotes();
       assertTrue(t1.getNumChildren() == 1);
       t2 = t1.getChild(0);
       assertTrue(t2.getNumChildren() == 1);
       t3 = t2.getChild(0);
       assertTrue(("This is a test note" == t3.getCharacters()));
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:41,代码来源:TestSBase.cs

示例2: test_SBase_setNotesString

 public void test_SBase_setNotesString()
 {
     SBase c = new Model (1, 2);
     string notes = "This is a test note";
     string taggednotes = "<notes>This is a test note</notes>";
     c.setNotes (notes);
     assertTrue (c.isSetNotes () == true);
     if ((taggednotes != c.getNotesString ()))
         ;
     {
     }
     XMLNode t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     XMLNode t2 = t1.getChild (0);
     assertTrue (("This is a test note" == t2.getCharacters ()));
     c.setNotes (c.getNotesString ());
     t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     string chars = c.getNotesString ();
     assertTrue ((taggednotes == chars));
     c.setNotes ("");
     assertTrue (c.isSetNotes () == false);
     if (c.getNotesString () != null)
         ;
     {
     }
     c.setNotes (taggednotes);
     assertTrue (c.isSetNotes () == true);
     if ((taggednotes != c.getNotesString ()))
         ;
     {
     }
     t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     t2 = t1.getChild (0);
     assertTrue (("This is a test note" == t2.getCharacters ()));
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:37,代码来源:TestSBase.cs

示例3: test_SBase_setNotesString_l3

 public void test_SBase_setNotesString_l3()
 {
     SBase c = new Model(3, 1);
       string notes = "This is a test note";
       string taggednotes = "<notes>\n" + "  <p xmlns=\"http://www.w3.org/1999/xhtml\">This is a test note</p>\n" + "</notes>";
       c.setNotes(notes);
       assertTrue(c.isSetNotes() == false);
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:8,代码来源:TestSBase.cs

示例4: test_SBase_setNotes

 public void test_SBase_setNotes()
 {
     SBase c = new Model (1, 2);
     XMLToken token;
     XMLNode node;
     token = new XMLToken ("This is a test note");
     node = new XMLNode (token);
     c.setNotes (node);
     assertTrue (c.isSetNotes () == true);
     if (c.getNotes () == node)
         ;
     {
     }
     XMLNode t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     assertTrue (("This is a test note" == t1.getChild (0).getCharacters ()));
     c.setNotes (c.getNotes ());
     t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     string chars = t1.getChild (0).getCharacters ();
     assertTrue (("This is a test note" == chars));
     c.setNotes ((XMLNode)null);
     assertTrue (c.isSetNotes () == false);
     if (c.getNotes () != null)
         ;
     {
     }
     c.setNotes (node);
     assertTrue (c.isSetNotes () == true);
     token = new XMLToken ("(CR) &#0168; &#x00a8; &#x00A8; (NOT CR) &#; &#x; &#00a8; &#0168 &#x00a8");
     node = new XMLNode (token);
     c.setNotes (node);
     t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     string s = t1.getChild (0).toXMLString ();
     string expected = "(CR) &#0168; &#x00a8; &#x00A8; (NOT CR) &amp;#; &amp;#x; &amp;#00a8; &amp;#0168 &amp;#x00a8";
     assertTrue ((expected == s));
     token = new XMLToken ("& ' > < \" &amp; &apos; &gt; &lt; &quot;");
     node = new XMLNode (token);
     c.setNotes (node);
     t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     string s2 = t1.getChild (0).toXMLString ();
     string expected2 = "&amp; &apos; &gt; &lt; &quot; &amp; &apos; &gt; &lt; &quot;";
     assertTrue ((expected2 == s2));
     token = null;
     node = null;
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:48,代码来源:TestSBase.cs


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