public void PropertyValueTest() { dynamic d = new TesterDynamic(); d.Property = "Property"; string actual = GetPropertyValue(d.Property); Assert.AreEqual("Dynamic: Property", actual); }
private string GetRoute(dynamic values) { TesterDynamic t = values as TesterDynamic; if (t == null) { return(null); } return(t.GetValues()["Page"].ToString()); }
public void RouteDynamicTests() { dynamic t = new TesterDynamic(); t.Page = "default.aspx"; int i = 0; string route = GetRoute(t); string nullRoute = GetRoute(i); Assert.AreEqual("default.aspx", route); Assert.IsNull(nullRoute); }