// ========================================================================== // BooleanFieldPropertiesTests.cs // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex Group // All rights reserved. // ========================================================================== using System.Collections.Generic; using System.Linq; using FluentAssertions; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure; using Xunit; namespace Squidex.Domain.Apps.Entities.Schemas.Guards.FieldProperties { public class BooleanFieldPropertiesTests { [Fact] public void Should_add_error_if_editor_is_not_valid() { var sut = new BooleanFieldProperties { Editor = (BooleanFieldEditor)123 }; var errors = FieldPropertiesValidator.Validate(sut).ToList(); errors.ShouldBeEquivalentTo( new List { new ValidationError("Editor is not a valid value.", "Editor") }); } } }