Parse() public méthode

public Parse ( string value ) : void
value string
Résultat void
Exemple #1
0
        public void ParseBoolTrue()
        {
            Property prop = new BoolProperty("test", false);
            AttachEvents(prop);

            prop.ValueChanged += (s, e) =>
            {
                Assert.AreSame(prop, s);
                Assert.AreEqual(true, ((BoolProperty)prop).Value);
            };

            prop.Parse("true");

            Assert.AreEqual(true, ((BoolProperty)prop).Value);
            Assert.AreEqual(EventFlags.ValueChanged | EventFlags.Modified, _eventsFired);
        }