public void PropertyBag_CustomValues() { var target = new PageInfo(); const string propName = "myProp"; const string propValue = "myPropValue"; target.AddProperty(propName, propValue); Assert.Equal(1, target.PropertyBag.Count); Assert.Equal(propValue, target.PropertyBag[propName]); Assert.Equal(propValue, target.GetProperty(propName)); }
public void OrderLineItemCount() { var target = new PageInfo(); const int expected = 4; target.OrderLineItemCount = expected; var actual = target.OrderLineItemCount; Assert.Equal(expected, actual); // OrderLineItemCount generates another property: Assert.Equal(expected.ToString(), target.GetProperty(PageInfo.PropertyProductCount)); }
public void GetProperty_NonExists() { var target = new PageInfo(); Assert.Equal(string.Empty, target.GetProperty("oops")); }