public void Not_be_Editable() { var sut = new NZazuErrorListField(new FieldDefinition { Key = "key" }, ServiceLocator); sut.IsEditable.Should().BeFalse(); sut.Dispose(); }
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(); }
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(); }
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(); }