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.
29 lines
1009 B
29 lines
1009 B
// ==========================================================================
|
|
// StringExtensionsTests.cs
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex Group
|
|
// All rights reserved.
|
|
// ==========================================================================
|
|
|
|
using Xunit;
|
|
|
|
namespace Squidex.Infrastructure
|
|
{
|
|
public class StringExtensionsTests
|
|
{
|
|
[Theory]
|
|
[InlineData("my", "My")]
|
|
[InlineData("myProperty ", "MyProperty")]
|
|
[InlineData("my property", "MyProperty")]
|
|
[InlineData("my_property", "MyProperty")]
|
|
[InlineData("my-property", "MyProperty")]
|
|
[InlineData("my property", "MyProperty")]
|
|
[InlineData("my__property", "MyProperty")]
|
|
[InlineData("my--property", "MyProperty")]
|
|
public void Should_convert_to_pascal_case(string input, string output)
|
|
{
|
|
Assert.Equal(output, input.ToPascalCase());
|
|
}
|
|
}
|
|
}
|
|
|