Headless CMS and Content Managment Hub
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.
 
 
 
 
 

59 lines
1.6 KiB

// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Squidex.Domain.Apps.Core.Schemas;
using Xunit;
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<string?>
{
["iv"] = "ABC"
}
};
var rhs = new StringFieldProperties
{
DefaultValues = new LocalizedValue<string?>
{
["iv"] = "ABC"
}
};
Assert.Equal(lhs, rhs);
}
[Fact]
public void Should_compare_two_tags_fields_as_equal()
{
var lhs = new TagsFieldProperties
{
DefaultValues = new LocalizedValue<string[]?>
{
["iv"] = new[] { "A", "B", "C" }
}
};
var rhs = new TagsFieldProperties
{
DefaultValues = new LocalizedValue<string[]?>
{
["iv"] = new[] { "A", "B", "C" }
}
};
Assert.Equal(lhs, rhs);
}
}
}