mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.0 KiB
34 lines
1.0 KiB
// ==========================================================================
|
|
// BooleanFieldPropertiesTests.cs
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex Group
|
|
// All rights reserved.
|
|
// ==========================================================================
|
|
|
|
using System.Collections.Generic;
|
|
using FluentAssertions;
|
|
using Squidex.Infrastructure;
|
|
using Xunit;
|
|
|
|
namespace Squidex.Core.Schemas
|
|
{
|
|
public class BooleanFieldPropertiesTests
|
|
{
|
|
private readonly List<ValidationError> errors = new List<ValidationError>();
|
|
|
|
[Fact]
|
|
public void Should_add_error_if_editor_is_not_valid()
|
|
{
|
|
var sut = new BooleanFieldProperties { Editor = (BooleanFieldEditor)123 };
|
|
|
|
sut.Validate(errors);
|
|
|
|
errors.ShouldBeEquivalentTo(
|
|
new List<ValidationError>
|
|
{
|
|
new ValidationError("Editor ist not a valid value", "Editor")
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|