public void CheckSetParameter() { var param1 = new MenuItemParameter ("p1", "dp1"); param1.SetValue (string.Empty); var param2 = new MenuItemParameter ("p2", "dp2"); param2.SetValue (string.Empty); const string pv1 = "new-value"; this.context = new MenuContext (string.Empty, string.Empty, param1, param2); this.context [0] = pv1; Assert.AreEqual (pv1, this.context.Parameters [0].Value); Assert.AreEqual (string.Empty, this.context.Parameters [1].Value); }
public void CheckSetOutOfRangeParameter_Less() { var param1 = new MenuItemParameter ("p1", "dp1"); param1.SetValue (string.Empty); var param2 = new MenuItemParameter ("p2", "dp2"); param2.SetValue (string.Empty); const string pv1 = "new-value"; this.context = new MenuContext (string.Empty, string.Empty, param1, param2); this.context [-1] = pv1; }