Ejemplo n.º 1
0
 public void Save_SelectedIndexWithSpecialChar()
 {
     // This test makes sure that when SaveSelectedIndexImpl() is called with a index
     // of item with Xml special char in the item.Name, the special char is escaped
     Assert.AreEqual(
         "2:<foo>",
         DSDropDownBase.SaveSelectedIndexImpl(2, TestListWithItemWithSpecialChar()));
 }
Ejemplo n.º 2
0
 public void Load_SelectionIndexNoNameMatch()
 {
     Assert.AreEqual(-1, DSDropDownBase.ParseSelectedIndex("2:foo", TestList()));
 }
Ejemplo n.º 3
0
 public void Load_SelectionIndexOutOfRange()
 {
     Assert.AreEqual(-1, DSDropDownBase.ParseSelectedIndex("12", TestList()));
 }
Ejemplo n.º 4
0
 public void Load_SelectionIndexOnly()
 {
     Assert.AreEqual(2, DSDropDownBase.ParseSelectedIndex("2", TestList()));
 }
Ejemplo n.º 5
0
 public void Load_Selection()
 {
     Assert.AreEqual(2, DSDropDownBase.ParseSelectedIndex("2:banana:blueberry", TestList()));
 }
Ejemplo n.º 6
0
 public void Load_NothingSelected()
 {
     Assert.AreEqual(-1, DSDropDownBase.ParseSelectedIndex("-1", TestList()));
 }
Ejemplo n.º 7
0
 public void Save_SelectedIndex()
 {
     Assert.AreEqual(
         "2:banana:blueberry",
         DSDropDownBase.SaveSelectedIndex(2, TestList()));
 }
Ejemplo n.º 8
0
 public void Save_NothingInList()
 {
     Assert.AreEqual("-1", DSDropDownBase.SaveSelectedIndex(5, new List <DynamoDropDownItem>()));
 }
Ejemplo n.º 9
0
 public void Save_NothingSelected()
 {
     Assert.AreEqual(
         "-1",
         DSDropDownBase.SaveSelectedIndex(-1, TestList()));
 }
Ejemplo n.º 10
0
 public void Load_SelectionIndexSpecialCharMatch2()
 {
     Assert.AreEqual(2, DSDropDownBase.ParseSelectedIndexImpl("2:&lt;foo&gt;", TestListWithItemWithSpecialChar()));
 }
Ejemplo n.º 11
0
 public void Load_SelectionIndexSpecialCharNoMatch()
 {
     Assert.AreEqual(-1, DSDropDownBase.ParseSelectedIndexImpl("2:<foo>", TestList()));
 }