コード例 #1
0
        public void RemoveAt_Invoke_Success()
        {
            var control    = new Control();
            var collection = new ControlBindingsCollection(control);
            var binding    = new Binding(null, new object(), "member");

            collection.Add(binding);
            Assert.Same(binding, Assert.Single(collection));
            Assert.Same(control, binding.BindableComponent);

            collection.RemoveAt(0);
            Assert.Empty(collection);
            Assert.Null(binding.BindableComponent);
        }