// ========================================================================== // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex UG (haftungsbeschraenkt) // All rights reserved. Licensed under the MIT license. // ========================================================================== using Squidex.Domain.Apps.Core.Schemas; using Squidex.Infrastructure.Collections; namespace Squidex.Domain.Apps.Core.Model.Schemas; public class FieldCompareTests { [Fact] public void Should_compare_two_string_fields_as_equal() { var lhs = new StringFieldProperties { DefaultValues = new LocalizedValue(new Dictionary { ["iv"] = "ABC", }), }; var rhs = new StringFieldProperties { DefaultValues = new LocalizedValue(new Dictionary { ["iv"] = "ABC", }), }; Assert.Equal(lhs, rhs); } [Fact] public void Should_compare_two_tags_fields_as_equal() { var lhs = new TagsFieldProperties { DefaultValues = new LocalizedValue?>(new Dictionary?> { ["iv"] = ReadonlyList.Create("A", "B", "C"), }), }; var rhs = new TagsFieldProperties { DefaultValues = new LocalizedValue?>(new Dictionary?> { ["iv"] = ReadonlyList.Create("A", "B", "C"), }), }; Assert.Equal(lhs, rhs); } }