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

            sut.IsEditable.Should().BeFalse();

            sut.Dispose();
        }
コード例 #2
0
        public void Return_null_StringValue_and_not_set_StringValue()
        {
            var sut = new NZazuErrorListField(new FieldDefinition {
                Key = "key"
            }, ServiceLocator);

            sut.GetValue().Should().BeNull();
            sut.SetValue("foobar");
            sut.GetValue().Should().BeNull();

            sut.Dispose();
        }
コード例 #3
0
        public void Create_ValueControl_On_Empty_Description()
        {
            var sut = new NZazuErrorListField(new FieldDefinition {
                Key = "key"
            }, ServiceLocator);

            sut.Definition.Description.Should().BeNullOrWhiteSpace();
            var label = (ErrorPanel)sut.ValueControl;

            label.Should().NotBeNull();

            sut.Dispose();
        }
コード例 #4
0
        public void Create_ValueControl_Matching_Description()
        {
            var sut = new NZazuErrorListField(new FieldDefinition {
                Key = "key", Description = "superhero is alive"
            },
                                              ServiceLocator);

            var label = (ErrorPanel)sut.ValueControl;

            label.Should().NotBeNull();
            label.Errors.Should().BeEmpty();

            sut.Dispose();
        }