コード例 #1
0
        public void TestListenerStuff()
        {
            IAtom hydrogen = new ImmutableHydrogen();

            Assert.AreEqual(0, hydrogen.Listeners.Count);
            hydrogen.Listeners.Add(new DummyListenerAdd());
            Assert.AreEqual(0, hydrogen.Listeners.Count);
            hydrogen.Listeners.Remove(new DummyListenerRemove());
            Assert.AreEqual(0, hydrogen.Listeners.Count);
            hydrogen.NotifyChanged();

            Assert.IsFalse(hydrogen.Notification);
            hydrogen.Notification = true;
            Assert.IsFalse(hydrogen.Notification);
        }