コード例 #1
0
ファイル: ObservableObject.cs プロジェクト: qube7/qcomposite
        public void Test_02()
        {
            Sample_02 sample = new Sample_02();

            List <string> list = new List <string>();

            sample.PropertyChanged += (s, e) => { list.Add(e.PropertyName); };

            sample.Update();

            Assert.AreEqual(1, list.Count);
            Assert.AreEqual(string.Empty, list[0]);
        }
コード例 #2
0
        public void Test_02()
        {
            Sample_02 sample = new Sample_02();

            List <string> list = new List <string>();

            sample.PropertyChanged += (s, e) => { list.Add(e.PropertyName); };

            Culture.Current = CultureInfo.InvariantCulture;

            Assert.AreEqual(2, list.Count);
            Assert.AreEqual(nameof(Sample_02.Culture), list[0]);
            Assert.AreEqual(nameof(Sample_02.Prop1), list[1]);
        }