Parse() public method

public Parse ( string value ) : void
value string
return void
コード例 #1
0
ファイル: PropertyTests.cs プロジェクト: Elof3/Treefrog
        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);
        }