コード例 #1
0
        public void Not_be_Editable()
        {
            var sut = new NZazuGroupField(new FieldDefinition {
                Key = "test"
            }, ServiceLocator);

            sut.IsEditable.Should().BeFalse();
        }
コード例 #2
0
        public void Not_support_direct_binding_or_validation()
        {
            var sut = new NZazuGroupField(new FieldDefinition {
                Key = "key"
            }, ServiceLocator);

            sut.ContentProperty.Should().Be(null);
        }
コード例 #3
0
        public void Create_Groupbox()
        {
            var sut = new NZazuGroupField(new FieldDefinition {
                Key = "key", Description = "Header"
            }, ServiceLocator);
            var contentControl = (GroupBox)sut.ValueControl;

            contentControl.Should().NotBeNull();

            contentControl.Focusable.Should().BeFalse("group fields should not have a tab stop of their own");
        }
コード例 #4
0
        public void Be_Creatable()
        {
            var definition = new FieldDefinition {
                Key = "key", Type = "group"
            };
            var sut = new NZazuGroupField(definition, ServiceLocator);

            sut.ApplySettings(definition);
            sut.Should().NotBeNull();

            sut.Should().BeAssignableTo <INZazuWpfField>();
            sut.Should().BeAssignableTo <INZazuWpfFieldContainer>();

            // at least nobodyd cares about these values
            sut.GetValue().Should().BeNullOrEmpty();
            sut.SetValue("foo");
            sut.GetValue().Should().BeNullOrEmpty();
        }