public void SimpleCustomPropertyTest() { const int testId = 42; dynamic testValue = 1; const string expectedRendering = "1"; A11yProperty.RegisterCustomProperty(testId, new IntTypeConverter()); A11yProperty kp = new A11yProperty(testId, testValue); Assert.AreEqual(expectedRendering, kp.ToString()); }
public void RegisterTwiceCustomPropertyTest() { const int testId = 42; dynamic testValue = 1; const string expectedRendering = "1"; A11yProperty.RegisterCustomProperty(testId, new PointTypeConverter()); // First registration, should be dropped. A11yProperty.RegisterCustomProperty(testId, new IntTypeConverter()); // Second registration, last one wins. A11yProperty kp = new A11yProperty(testId, testValue); Assert.AreEqual(expectedRendering, kp.ToString()); }