Beispiel #1
0
        public void ComponentEditorPage_SetComponent_Invoke_SetsComponent(IComponent component)
        {
            using var control = new SubComponentEditorPage();
            control.SetComponent(component);
            Assert.Same(component, control.Component);
            Assert.Equal(0, control.LoadComponentCallCount);
            Assert.Equal(0, control.Loading);
            Assert.True(control.LoadRequired);

            // Set same.
            control.SetComponent(component);
            Assert.Same(component, control.Component);
            Assert.Equal(0, control.LoadComponentCallCount);
            Assert.Equal(0, control.Loading);
            Assert.True(control.LoadRequired);
        }
        public void ComponentEditorPage_SetComponent_Invoke_SetsComponent(IComponent component)
        {
            var page = new SubComponentEditorPage();

            page.SetComponent(component);
            Assert.Same(component, page.Component);
            Assert.Equal(0, page.LoadComponentCallCount);
            Assert.Equal(0, page.Loading);
            Assert.True(page.LoadRequired);

            // Set same.
            page.SetComponent(component);
            Assert.Same(component, page.Component);
            Assert.Equal(0, page.LoadComponentCallCount);
            Assert.Equal(0, page.Loading);
            Assert.True(page.LoadRequired);
        }