You're breathtaking!

This commit is contained in:
Wojtek Figat
2020-12-07 23:40:54 +01:00
commit 6fb9eee74c
5143 changed files with 1153594 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
using NUnit.Framework;
namespace FlaxEngine.Tests
{
/// <summary>
/// Tests for <see cref="StringUtils"/>.
/// </summary>
[TestFixture]
public class TestStringUtils
{
/// <summary>
/// Test incrementing name numbers.
/// </summary>
[Test]
public void TestIncName()
{
Assert.AreEqual("my Name", StringUtils.IncrementNameNumber("my Name", null));
Assert.AreEqual("my Name", StringUtils.IncrementNameNumber("my Name", x => true));
Assert.AreEqual("my Name 10", StringUtils.IncrementNameNumber("my Name 1", x => x.EndsWith("10")));
Assert.AreEqual("my Name (10)", StringUtils.IncrementNameNumber("my Name (1)", x => x.EndsWith("10)")));
Assert.AreEqual("my Name110", StringUtils.IncrementNameNumber("my Name100", x => x.EndsWith("110")));
}
}
}